clang
10.0.0svn
|
Bytecode function. More...
#include "/opt/doxygen-docs/src/llvm/tools/clang/lib/AST/Interp/Function.h"
Public Types | |
using | ParamDescriptor = std::pair< PrimType, Descriptor * > |
using | arg_reverse_iterator = SmallVectorImpl< PrimType >::reverse_iterator |
Range over argument types. More... | |
Public Member Functions | |
unsigned | getFrameSize () const |
Returns the size of the function's local stack. More... | |
unsigned | getArgSize () const |
Returns the size of the argument stackx. More... | |
CodePtr | getCodeBegin () const |
Returns a pointer to the start of the code. More... | |
CodePtr | getCodeEnd () const |
Returns a pointer to the end of the code. More... | |
const FunctionDecl * | getDecl () const |
Returns the original FunctionDecl. More... | |
SourceLocation | getLoc () const |
Returns the lcoation. More... | |
ParamDescriptor | getParamDescriptor (unsigned Offset) const |
Returns a parameter descriptor. More... | |
bool | hasRVO () const |
Checks if the first argument is a RVO pointer. More... | |
llvm::iterator_range< llvm::SmallVector< Scope, 2 >::iterator > | scopes () |
Range over the scope blocks. More... | |
llvm::iterator_range< arg_reverse_iterator > | args_reverse () |
Scope & | getScope (unsigned Idx) |
Returns a specific scope. More... | |
SourceInfo | getSource (CodePtr PC) const |
Returns the source information at a given PC. More... | |
bool | isConstexpr () const |
Checks if the function is valid to call in constexpr. More... | |
bool | isVirtual () const |
Checks if the function is virtual. More... | |
bool | isConstructor () const |
Checks if the function is a constructor. More... | |
void | dump () const |
Dumps the disassembled bytecode to llvm::errs() . More... | |
void | dump (llvm::raw_ostream &OS) const |
Friends | |
class | Program |
class | ByteCodeEmitter |
Bytecode function.
Contains links to the bytecode of the function, as well as metadata describing all arguments and stack-local variables.
Definition at line 59 of file Function.h.
using clang::interp::Function::arg_reverse_iterator = SmallVectorImpl<PrimType>::reverse_iterator |
Range over argument types.
Definition at line 91 of file Function.h.
using clang::interp::Function::ParamDescriptor = std::pair<PrimType, Descriptor *> |
Definition at line 61 of file Function.h.
|
inline |
Definition at line 92 of file Function.h.
Referenced by clang::interp::InterpFrame::popArgs().
LLVM_DUMP_METHOD void Function::dump | ( | ) | const |
Dumps the disassembled bytecode to llvm::errs()
.
Definition at line 23 of file Disasm.cpp.
Referenced by clang::interp::Program::dump().
LLVM_DUMP_METHOD void Function::dump | ( | llvm::raw_ostream & | OS | ) | const |
Definition at line 25 of file Disasm.cpp.
|
inline |
Returns the size of the argument stackx.
Definition at line 66 of file Function.h.
CodePtr Function::getCodeBegin | ( | ) | const |
Returns a pointer to the start of the code.
Definition at line 24 of file Function.cpp.
Referenced by clang::interp::InterpFrame::getPC().
CodePtr Function::getCodeEnd | ( | ) | const |
Returns a pointer to the end of the code.
Definition at line 26 of file Function.cpp.
|
inline |
Returns the original FunctionDecl.
Definition at line 74 of file Function.h.
Referenced by clang::interp::InterpFrame::getCallee().
|
inline |
Returns the size of the function's local stack.
Definition at line 64 of file Function.h.
|
inline |
Returns the lcoation.
Definition at line 77 of file Function.h.
References clang::interp::Scope::Local::Offset.
Function::ParamDescriptor Function::getParamDescriptor | ( | unsigned | Offset | ) | const |
Returns a parameter descriptor.
Definition at line 28 of file Function.cpp.
Referenced by clang::interp::InterpFrame::getParamPointer().
|
inline |
Returns a specific scope.
Definition at line 97 of file Function.h.
Referenced by clang::interp::InterpFrame::destroy().
SourceInfo Function::getSource | ( | CodePtr | PC | ) | const |
Returns the source information at a given PC.
Definition at line 34 of file Function.cpp.
References Offset.
Referenced by clang::interp::EvalEmitter::getSource(), and clang::interp::InterpState::getSource().
|
inline |
Checks if the first argument is a RVO pointer.
Definition at line 83 of file Function.h.
Referenced by clang::interp::InterpFrame::describe().
|
inline |
Checks if the function is valid to call in constexpr.
Definition at line 103 of file Function.h.
Referenced by clang::interp::Context::isPotentialConstantExpr().
|
inline |
Checks if the function is a constructor.
Definition at line 109 of file Function.h.
References P.
Referenced by clang::interp::InterpFrame::~InterpFrame().
bool Function::isVirtual | ( | ) | const |
Checks if the function is virtual.
Definition at line 44 of file Function.cpp.
|
inline |
Range over the scope blocks.
Definition at line 86 of file Function.h.
|
friend |
Definition at line 129 of file Function.h.
|
friend |
Definition at line 128 of file Function.h.