Go to the documentation of this file.
18 #include "llvm/Support/Compiler.h"
19 #include "llvm/Support/Format.h"
21 using namespace clang;
27 return OpPC.
read<T>();
33 uint32_t
ID = OpPC.
read<uint32_t>();
34 return reinterpret_cast<T
>(
P.getNativePointer(
ID));
41 if (
auto *Cons = dyn_cast<CXXConstructorDecl>(F)) {
43 OS << Name <<
"::" << Name <<
":\n";
53 OS <<
"rvo: " <<
hasRVO() <<
"\n";
55 auto PrintName = [&OS](
const char *Name) {
57 for (
long I = 0, N = strlen(Name); I < 30 - N; ++I) {
63 size_t Addr = PC - Start;
64 auto Op = PC.read<
Opcode>();
65 OS << llvm::format(
"%8d", Addr) <<
" ";
68 #include "Opcodes.inc"
77 for (
auto &Func : Funcs) {
80 for (
auto &Anon : AnonFuncs) {
CodePtr getCodeBegin() const
Returns a pointer to the start of the code.
unsigned getArgSize() const
Returns the size of the argument stackx.
CodePtr getCodeEnd() const
Returns a pointer to the end of the code.
The name of a declaration.
bool hasRVO() const
Checks if the first argument is a RVO pointer.
std::enable_if_t<!std::is_pointer< T >::value, T > read()
Reads data and advances the pointer.
Pointer into the code segment.
void dump() const
Dumps the disassembled bytecode to llvm::errs().
void dump() const
Dumps the disassembled bytecode to llvm::errs().
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
The program contains and links the bytecode for all functions.
unsigned getFrameSize() const
Returns the size of the function's local stack.
std::enable_if_t<!std::is_pointer< T >::value, T > ReadArg(InterpState &S, CodePtr OpPC)