A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://clang.llvm.org/doxygen/classclang_1_1interp_1_1Program.html below:

clang: clang::interp::Program Class Reference

The program contains and links the bytecode for all functions. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/AST/ByteCode/Program.h"

  Program (Context &Ctx)     ~Program ()   unsigned  getOrCreateNativePointer (const void *Ptr)   Marshals a native pointer to an ID for embedding in bytecode.
  const void *  getNativePointer (unsigned Idx)   Returns the value of a marshalled native pointer.
  unsigned  createGlobalString (const StringLiteral *S, const Expr *Base=nullptr)   Emits a string literal among global data.
  Pointer  getPtrGlobal (unsigned Idx) const   Returns a pointer to a global.
  BlockgetGlobal (unsigned Idx)   Returns the value of a global.
  std::optional< unsignedgetGlobal (const ValueDecl *VD)   Finds a global's index.
  std::optional< unsignedgetGlobal (const Expr *E)   std::optional< unsignedgetOrCreateGlobal (const ValueDecl *VD, const Expr *Init=nullptr)   Returns or creates a global an creates an index to it.
  unsigned  getOrCreateDummy (const DeclTy &D)   Returns or creates a dummy value for unknown declarations.
  std::optional< unsignedcreateGlobal (const ValueDecl *VD, const Expr *Init)   Creates a global and returns its index.
  std::optional< unsignedcreateGlobal (const Expr *E)   Creates a global from a lifetime-extended temporary.
  template<typename... Ts> FunctioncreateFunction (const FunctionDecl *Def, Ts &&...Args)   Creates a new function from a code range.
  template<typename... Ts> FunctioncreateFunction (Ts &&...Args)   Creates an anonymous function.
  FunctiongetFunction (const FunctionDecl *F)   Returns a function.
  RecordgetOrCreateRecord (const RecordDecl *RD)   Returns a record or creates one if it does not exist.
  DescriptorcreateDescriptor (const DeclTy &D, PrimType Type, Descriptor::MetadataSize MDSize=std::nullopt, bool IsConst=false, bool IsTemporary=false, bool IsMutable=false)   Creates a descriptor for a primitive type.
  DescriptorcreateDescriptor (const DeclTy &D, const Type *Ty, Descriptor::MetadataSize MDSize=std::nullopt, bool IsConst=false, bool IsTemporary=false, bool IsMutable=false, const Expr *Init=nullptr)   Creates a descriptor for a composite type.
  std::optional< unsignedgetCurrentDecl () const   Returns the current declaration ID.
  void  dump () const   Dumps the disassembled bytecode to llvm::errs().
  void  dump (llvm::raw_ostream &OS) const  

The program contains and links the bytecode for all functions.

Definition at line 39 of file Program.h.

◆ Program() clang::interp::Program::Program ( ContextCtx ) inline

Definition at line 41 of file Program.h.

◆ ~Program() clang::interp::Program::~Program ( ) inline ◆ createDescriptor() [1/2]

Creates a descriptor for a composite type.

Definition at line 388 of file Program.cpp.

References clang::interp::Context::classify(), createDescriptor(), D, clang::interp::Descriptor::getAllocSize(), clang::Type::getAs(), clang::Type::getAsArrayTypeUnsafe(), clang::ArrayType::getElementType(), getOrCreateRecord(), clang::QualType::getTypePtr(), clang::interp::primSize(), and clang::T.

◆ createDescriptor() [2/2] ◆ createFunction() [1/2] ◆ createFunction() [2/2]

template<typename... Ts>

Function * clang::interp::Program::createFunction ( Ts &&...  Args ) inline ◆ createGlobal() [1/2] std::optional< unsigned > Program::createGlobal ( const ExprE ) ◆ createGlobal() [2/2] ◆ createGlobalString()

Emits a string literal among global data.

Definition at line 35 of file Program.cpp.

References clang::interp::Pointer::atIndex(), clang::interp::Descriptor::getAllocSize(), clang::interp::Context::getCharBit(), clang::interp::Context::getEvalID(), clang::Global, clang::interp::Descriptor::GlobalMD, clang::interp::Pointer::initialize(), clang::interp::PT_Sint8, clang::interp::PT_Uint16, clang::interp::PT_Uint32, and clang::T.

◆ dump() [1/2] LLVM_DUMP_METHOD void Program::dump ( ) const

Dumps the disassembled bytecode to llvm::errs().

Definition at line 102 of file Disasm.cpp.

References dump().

Referenced by dump().

◆ dump() [2/2] LLVM_DUMP_METHOD void Program::dump ( llvm::raw_ostream &  OS ) const

Definition at line 142 of file Disasm.cpp.

References clang::interp::Descriptor::asExpr(), clang::interp::Descriptor::dump(), clang::Func, clang::interp::Context::getASTContext(), clang::interp::Descriptor::getPrimType(), getPtrGlobal(), clang::Global, clang::interp::Descriptor::isDummy(), clang::interp::Pointer::isInitialized(), clang::interp::Descriptor::isPrimitive(), clang::interp::Descriptor::IsTemporary, primTypeToString(), TYPE_SWITCH, and V.

◆ getCurrentDecl() std::optional< unsigned > clang::interp::Program::getCurrentDecl ( ) const inline ◆ getFunction() ◆ getGlobal() [1/3] std::optional< unsigned > Program::getGlobal ( const ExprE ) ◆ getGlobal() [2/3] ◆ getGlobal() [3/3] ◆ getNativePointer() const void * Program::getNativePointer ( unsigned  Idx )

Returns the value of a marshalled native pointer.

Definition at line 31 of file Program.cpp.

◆ getOrCreateDummy()

Returns or creates a dummy value for unknown declarations.

Definition at line 149 of file Program.cpp.

References clang::interp::Context::classify(), createDescriptor(), D, E, clang::interp::Descriptor::getAllocSize(), clang::Type::getAs(), getCurrentDecl(), clang::interp::Context::getEvalID(), clang::Type::getPointeeType(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::QualType::getTypePtr(), clang::Global, clang::interp::Descriptor::isDummy(), clang::QualType::isNull(), clang::ValueDecl::isWeak(), clang::interp::Descriptor::makeDummy(), and clang::T.

◆ getOrCreateGlobal() std::optional< unsigned > Program::getOrCreateGlobal ( const ValueDeclVD, const ExprInit = nullptr  ) ◆ getOrCreateNativePointer() unsigned Program::getOrCreateNativePointer ( const void *  Ptr )

Marshals a native pointer to an ID for embedding in bytecode.

Definition at line 20 of file Program.cpp.

◆ getOrCreateRecord()

Returns a record or creates one if it does not exist.

Definition at line 280 of file Program.cpp.

References clang::interp::align(), clang::interp::Context::classify(), createDescriptor(), clang::RecordDecl::fields(), clang::interp::Descriptor::getAllocSize(), clang::RecordDecl::getDefinition(), getOrCreateRecord(), clang::interp::Record::getSize(), clang::QualType::getTypePtr(), clang::TagDecl::isCompleteDefinition(), clang::QualType::isConstQualified(), and clang::T.

Referenced by clang::interp::ByteCodeEmitter::compileFunc(), createDescriptor(), and getOrCreateRecord().

◆ getPtrGlobal() ◆ DeclScope

The documentation for this class was generated from the following files:


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