15 using namespace clang;
20 llvm::DenseMap<unsigned, ParamDescriptor> &&Params)
21 : P(P), Loc(F->getBeginLoc()), F(F), ArgSize(ArgSize),
22 ParamTypes(
std::move(ParamTypes)), Params(
std::move(Params)) {}
29 auto It = Params.find(Offset);
30 assert(It != Params.end() &&
"Invalid parameter offset");
35 unsigned Offset = PC - getCodeBegin();
36 using Elem = std::pair<unsigned, SourceInfo>;
37 auto It = std::lower_bound(SrcMap.begin(), SrcMap.end(), Elem{
Offset, {}},
38 [](Elem A, Elem B) {
return A.first < B.first; });
39 if (It == SrcMap.end() || It->first !=
Offset)
40 llvm::report_fatal_error(
"missing source location");
45 if (
auto *M = dyn_cast<CXXMethodDecl>(F))
46 return M->isVirtual();
Represents a function declaration or definition.
Pointer into the code segment.
std::pair< PrimType, Descriptor * > ParamDescriptor
SourceInfo getSource(CodePtr PC) const
Returns the source information at a given PC.
Describes the statement/declaration an opcode was generated from.
ParamDescriptor getParamDescriptor(unsigned Offset) const
Returns a parameter descriptor.
CodePtr getCodeEnd() const
Returns a pointer to the end of the code.
CodePtr getCodeBegin() const
Returns a pointer to the start of the code.
The program contains and links the bytecode for all functions.
bool isVirtual() const
Checks if the function is virtual.
Dataflow Directional Tag Classes.
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).