20 llvm::DenseMap<unsigned, ParamDescriptor> &&Params,
21 bool HasThisPointer,
bool HasRVO)
22 :
P(
P), Loc(F->getBeginLoc()), F(F), ArgSize(ArgSize),
23 ParamTypes(
std::move(ParamTypes)), Params(
std::move(Params)),
24 HasThisPointer(HasThisPointer), HasRVO(HasRVO) {}
27 auto It = Params.find(
Offset);
28 assert(It != Params.end() &&
"Invalid parameter offset");
33 assert(PC >= getCodeBegin() &&
"PC does not belong to this function");
34 assert(PC <= getCodeEnd() &&
"PC Does not belong to this function");
35 assert(hasBody() &&
"Function has no body");
36 unsigned Offset = PC - getCodeBegin();
37 using Elem = std::pair<unsigned, SourceInfo>;
38 auto It = llvm::lower_bound(SrcMap, Elem{
Offset, {}}, llvm::less_first());
39 assert(It != SrcMap.end());
43bool Function::isVirtual()
const {
44 if (
auto *M = dyn_cast<CXXMethodDecl>(F))
45 return M->isVirtual();
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.