16 using namespace clang;
21 llvm::DenseMap<unsigned, ParamDescriptor> &&Params,
23 bool HasThisPointer,
bool HasRVO,
bool UnevaluatedBuiltin)
24 :
P(
P),
Loc(F->getBeginLoc()), F(F), ArgSize(ArgSize),
25 ParamTypes(
std::move(ParamTypes)), Params(
std::move(Params)),
26 ParamOffsets(
std::move(ParamOffsets)), HasThisPointer(HasThisPointer),
27 HasRVO(HasRVO), Variadic(F->isVariadic()),
28 IsUnevaluatedBuiltin(UnevaluatedBuiltin) {}
31 auto It = Params.find(
Offset);
32 assert(It != Params.end() &&
"Invalid parameter offset");
37 assert(PC >=
getCodeBegin() &&
"PC does not belong to this function");
38 assert(PC <=
getCodeEnd() &&
"PC Does not belong to this function");
39 assert(
hasBody() &&
"Function has no body");
41 using Elem = std::pair<unsigned, SourceInfo>;
42 auto It = llvm::lower_bound(SrcMap, Elem{
Offset, {}}, llvm::less_first());
43 assert(It != SrcMap.end());
48 if (
const auto *M = dyn_cast<CXXMethodDecl>(F))
49 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.
CodePtr getCodeBegin() const
Returns a pointer to the start of the code.
CodePtr getCodeEnd() const
Returns a pointer to the end of the code.
std::pair< PrimType, Descriptor * > ParamDescriptor
bool hasBody() const
Checks if the function already has a body attached.
bool isVirtual() const
Checks if the function is virtual.
SourceInfo getSource(CodePtr PC) const
Returns the source information at a given PC.
The program contains and links the bytecode for all functions.
Describes the statement/declaration an opcode was generated from.
The JSON file list parser is used to communicate input to InstallAPI.