21 llvm::DenseMap<unsigned, ParamDescriptor> &&Params,
23 bool HasThisPointer,
bool HasRVO,
bool UnevaluatedBuiltin)
24 :
P(
P), Source(Source), ArgSize(ArgSize), ParamTypes(
std::move(ParamTypes)),
25 Params(
std::move(Params)), ParamOffsets(
std::move(ParamOffsets)),
26 HasThisPointer(HasThisPointer), HasRVO(HasRVO),
27 IsUnevaluatedBuiltin(UnevaluatedBuiltin) {
28 if (
const auto *F = Source.dyn_cast<
const FunctionDecl *>())
29 Variadic = F->isVariadic();
33 auto It = Params.find(Offset);
34 assert(It != Params.end() &&
"Invalid parameter offset");
39 assert(PC >= getCodeBegin() &&
"PC does not belong to this function");
40 assert(PC <= getCodeEnd() &&
"PC Does not belong to this function");
41 assert(hasBody() &&
"Function has no body");
42 unsigned Offset = PC - getCodeBegin();
43 using Elem = std::pair<unsigned, SourceInfo>;
44 auto It = llvm::lower_bound(SrcMap, Elem{Offset, {}}, llvm::less_first());
45 if (It == SrcMap.end())
46 return SrcMap.back().second;
50bool Function::isVirtual()
const {
51 if (
const auto *M = dyn_cast_if_present<CXXMethodDecl>(
53 return M->isVirtual();
Defines enum values for all the target-independent builtin functions.
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Represents a function declaration or definition.
Pointer into the code segment.
std::pair< PrimType, Descriptor * > ParamDescriptor
The program contains and links the bytecode for all functions.
Describes the statement/declaration an opcode was generated from.
llvm::PointerUnion< const FunctionDecl *, const BlockExpr * > FunctionDeclTy
The JSON file list parser is used to communicate input to InstallAPI.