llvm::iterator_range<LocalVectorTy::const_iterator>
locals()
const{
51 returnllvm::make_range(Descriptors.begin(), Descriptors.end());
60llvm::PointerUnion<const FunctionDecl *, const BlockExpr *>;
104 returndyn_cast<const FunctionDecl *>(Source);
107 returndyn_cast<const BlockExpr *>(Source);
128llvm::iterator_range<llvm::SmallVector<Scope, 2>::const_iterator>
130 returnllvm::make_range(Scopes.begin(), Scopes.end());
137 returnllvm::reverse(ParamTypes);
172 if(
const auto*MD = dyn_cast_if_present<CXXMethodDecl>(
173dyn_cast<const FunctionDecl *>(Source)))
210 if(
const auto*MD = dyn_cast_if_present<CXXMethodDecl>(
211dyn_cast<const FunctionDecl *>(Source)))
212 returnMD->isExplicitObjectMemberFunction();
217 returnParamOffsets[ParamIndex];
221 returnParamTypes[ParamIndex];
228llvm::DenseMap<unsigned, ParamDescriptor> &&Params,
233 voidsetCode(
unsignedNewFrameSize, std::vector<std::byte> &&NewCode,
236FrameSize = NewFrameSize;
237Code = std::move(NewCode);
238SrcMap = std::move(NewSrcMap);
239Scopes = std::move(NewScopes);
241HasBody = NewHasBody;
244 voidsetIsFullyCompiled(
boolFC) { IsFullyCompiled = FC; }
245 voidsetDefined(
bool D) { Defined =
D; }
258 unsignedFrameSize = 0;
262std::vector<std::byte> Code;
270llvm::DenseMap<unsigned, ParamDescriptor> Params;
274 boolIsValid =
false;
277 boolIsFullyCompiled =
false;
280 boolHasThisPointer =
false;
284 boolHasRVO =
false;
286 boolHasBody =
false;
287 boolDefined =
false;
288 boolVariadic =
false;
289 boolVirtual =
false;
290 unsignedBuiltinID = 0;
295 void dump(llvm::raw_ostream &OS)
const;
This file provides some common utility functions for processing Lambda related AST Constructs.
enum clang::sema::@1704::IndirectLocalPathEntry::EntryKind Kind
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Represents a C++ struct/union/class.
DeclContext * getParent()
getParent - Returns the containing DeclContext.
Represents a function declaration or definition.
std::string getQualifiedNameAsString() const
An emitter which links the program to bytecode for later use.
Pointer into the code segment.
Scope & getScope(unsigned Idx)
Returns a specific scope.
CodePtr getCodeBegin() const
Returns a pointer to the start of the code.
bool isDestructor() const
Checks if the function is a destructor.
CodePtr getCodeEnd() const
Returns a pointer to the end of the code.
const std::string getName() const
Returns the name of the function decl this code was generated for.
bool isVirtual() const
Checks if the function is virtual.
unsigned getNumParams() const
bool isDefined() const
Checks if the function is defined.
bool hasNonNullAttr() const
PrimType getParamType(unsigned ParamIndex) const
std::pair< PrimType, Descriptor * > ParamDescriptor
const CXXRecordDecl * getParentDecl() const
Returns the parent record decl, if any.
unsigned getFrameSize() const
Returns the size of the function's local stack.
bool isLambdaCallOperator() const
Returns whether this function is the call operator of a lambda record decl.
const BlockExpr * getExpr() const
bool isFullyCompiled() const
Checks if the function is fully done compiling.
bool isConstructor() const
Checks if the function is a constructor.
unsigned getParamOffset(unsigned ParamIndex) const
const FunctionDecl * getDecl() const
Returns the original FunctionDecl.
bool hasBody() const
Checks if the function already has a body attached.
bool isUnevaluatedBuiltin() const
bool hasThisPointer() const
unsigned getBuiltinID() const
void dump() const
Dumps the disassembled bytecode to llvm::errs().
llvm::iterator_range< arg_reverse_iterator > args_reverse() const
bool isConstexpr() const
Checks if the function is valid to call in constexpr.
const Scope & getScope(unsigned Idx) const
bool isThisPointerExplicit() const
unsigned getNumWrittenParams() const
Returns the number of parameter this function takes when it's called, i.e excluding the instance poin...
unsigned getWrittenArgSize() const
unsigned getArgSize() const
Returns the size of the argument stack.
bool isLambdaStaticInvoker() const
Returns whether this function is a lambda static invoker, which we generate custom byte code for.
SmallVectorImpl< PrimType >::const_reverse_iterator arg_reverse_iterator
Range over argument types.
SourceInfo getSource(CodePtr PC) const
Returns the source information at a given PC.
ParamDescriptor getParamDescriptor(unsigned Offset) const
Returns a parameter descriptor.
llvm::iterator_range< llvm::SmallVector< Scope, 2 >::const_iterator > scopes() const
Range over the scope blocks.
bool hasRVO() const
Checks if the first argument is a RVO pointer.
The program contains and links the bytecode for all functions.
llvm::SmallVector< Local, 8 > LocalVectorTy
llvm::iterator_range< LocalVectorTy::const_iterator > locals() const
Scope(LocalVectorTy &&Descriptors)
Describes the statement/declaration an opcode was generated from.
std::vector< std::pair< unsigned, SourceInfo > > SourceMap
llvm::PointerUnion< const FunctionDecl *, const BlockExpr * > FunctionDeclTy
constexpr size_t align(size_t Size)
Aligns a size to the pointer alignment.
PrimType
Enumeration of the primitive types of the VM.
size_t primSize(PrimType Type)
Returns the size of a primitive type in bytes.
The JSON file list parser is used to communicate input to InstallAPI.
Describes a memory block created by an allocation site.
Information about a local's storage.
unsigned Offset
Offset of the local in frame.
Descriptor * Desc
Descriptor of the local.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4