21 llvm::DenseMap<unsigned, ParamDescriptor> &&Params,
23 bool HasThisPointer,
bool HasRVO)
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),
30 auto It = Params.find(Offset);
31 assert(It != Params.end() &&
"Invalid parameter offset");
36 assert(PC >= getCodeBegin() &&
"PC does not belong to this function");
37 assert(PC <= getCodeEnd() &&
"PC Does not belong to this function");
38 assert(hasBody() &&
"Function has no body");
39 unsigned Offset = PC - getCodeBegin();
40 using Elem = std::pair<unsigned, SourceInfo>;
41 auto It = llvm::lower_bound(SrcMap, Elem{Offset, {}}, llvm::less_first());
42 assert(It != SrcMap.end());
46bool Function::isVirtual()
const {
47 if (
const auto *M = dyn_cast<CXXMethodDecl>(F))
48 return M->isVirtual();
52bool Function::needsRuntimeArgPop(
const ASTContext &Ctx)
const {
Defines enum values for all the target-independent builtin functions.
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate....
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Builtin::Context & BuiltinInfo
bool hasCustomTypechecking(unsigned ID) const
Determines whether this builtin has custom typechecking.
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.