clang  14.0.0git
Classes | Typedefs | Enumerations | Functions
clang::interp Namespace Reference

Classes

class  Block
 A memory block, either on the stack or in the heap. More...
 
class  BlockScope
 Scope for storage declared in a compound statement. More...
 
class  Boolean
 Wrapper around boolean types. More...
 
class  ByteCodeEmitter
 An emitter which links the program to bytecode for later use. More...
 
class  ByteCodeExprGen
 Compilation context for expressions. More...
 
struct  ByteCodeGenError
 Error thrown by the compiler. More...
 
class  ByteCodeStmtGen
 Compilation context for statements. More...
 
class  CodePtr
 Pointer into the code segment. More...
 
class  Context
 Holds all information required to evaluate constexpr code in a module. More...
 
class  DeadBlock
 Descriptor for a dead block. More...
 
class  DeclScope
 Scope used to handle temporaries in toplevel variable declarations. More...
 
struct  Descriptor
 Describes a memory block created by an allocation site. More...
 
class  EvalEmitter
 An emitter which evaluates opcodes as they are emitted. More...
 
class  ExprScope
 Expression scope which tracks potentially lifetime extended temporaries which are hoisted to the parent scope on exit. More...
 
class  Frame
 Base class for stack frames, shared between VM and walker. More...
 
class  Function
 Bytecode function. More...
 
struct  InitMap
 Bitfield tracking the initialisation status of elements of primitive arrays. More...
 
struct  InlineDescriptor
 Inline descriptor embedded in structures and arrays. More...
 
class  Integral
 Wrapper around numeric types. More...
 
class  InterpFrame
 Frame storing local variables. More...
 
class  InterpStack
 Stack frame storing temporaries and parameters. More...
 
class  InterpState
 Interpreter context. More...
 
class  LabelScope
 Scope managing label targets. More...
 
class  LocalScope
 Scope for local variables. More...
 
class  LoopScope
 Sets the context for break/continue statements. More...
 
class  OptionScope
 Scope used to handle initialization methods. More...
 
class  Pointer
 A pointer to a memory block, live or dead. More...
 
struct  PrimConv
 Mapping from primitive types to their representation. More...
 
struct  PrimConv< PT_Bool >
 
struct  PrimConv< PT_Ptr >
 
struct  PrimConv< PT_Sint16 >
 
struct  PrimConv< PT_Sint32 >
 
struct  PrimConv< PT_Sint64 >
 
struct  PrimConv< PT_Sint8 >
 
struct  PrimConv< PT_Uint16 >
 
struct  PrimConv< PT_Uint32 >
 
struct  PrimConv< PT_Uint64 >
 
struct  PrimConv< PT_Uint8 >
 
class  Program
 The program contains and links the bytecode for all functions. More...
 
class  Record
 Structure/Class descriptor. More...
 
class  RecordScope
 
struct  Repr
 
struct  Repr< 16, false >
 
struct  Repr< 16, true >
 
struct  Repr< 32, false >
 
struct  Repr< 32, true >
 
struct  Repr< 64, false >
 
struct  Repr< 64, true >
 
struct  Repr< 8, false >
 
struct  Repr< 8, true >
 
class  Scope
 Describes a scope block. More...
 
class  SourceInfo
 Describes the statement/declaration an opcode was generated from. More...
 
class  SourceMapper
 Interface for classes which map locations to sources. More...
 
class  State
 Interface for the VM to interact with the AST walker's context. More...
 
class  SwitchScope
 
class  VariableScope
 Scope chain managing the variable lifetimes. More...
 

Typedefs

using DeclTy = unsigned llvm::PointerUnion< const Decl *, const Expr * >
 
using BlockCtorFn = void(*)(Block *Storage, char *FieldPtr, bool IsConst, bool IsMutable, bool IsActive, Descriptor *FieldDesc)
 Invoked whenever a block is created. More...
 
using BlockDtorFn = void(*)(Block *Storage, char *FieldPtr, Descriptor *FieldDesc)
 Invoked when a block is destroyed. More...
 
using BlockMoveFn = void(*)(Block *Storage, char *SrcFieldPtr, char *DstFieldPtr, Descriptor *FieldDesc)
 Invoked when a block with pointers referencing it goes out of scope. More...
 
using InterpSize = unsigned
 Object size as used by the interpreter. More...
 
using APInt = llvm::APInt
 
using APSInt = llvm::APSInt
 
using CompareFn = llvm::function_ref< bool(ComparisonCategoryResult)>
 
using SourceMap = std::vector< std::pair< unsigned, SourceInfo > >
 

Enumerations

enum  Opcode : uint32_t
 
enum  PrimType : unsigned {
  PT_Sint8, PT_Uint8, PT_Sint16, PT_Uint16,
  PT_Sint32, PT_Uint32, PT_Sint64, PT_Uint64,
  PT_Bool, PT_Ptr
}
 Enumeration of the primitive types of the VM. More...
 

Functions

llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, const Boolean &B)
 
template<typename T >
ComparisonCategoryResult Compare (const T &X, const T &Y)
 Helper to compare two comparable types. More...
 
template<unsigned Bits, bool Signed>
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, Integral< Bits, Signed > I)
 
bool CheckExtern (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if the variable has externally defined storage. More...
 
bool CheckArray (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if the array is offsetable. More...
 
bool CheckLive (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
 Checks if a pointer is live and accessible. More...
 
bool CheckNull (InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK)
 Checks if a pointer is null. More...
 
bool CheckRange (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
 Checks if a pointer is in range. More...
 
bool CheckRange (InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK)
 Checks if a field from which a pointer is going to be derived is valid. More...
 
bool CheckConst (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a pointer points to const storage. More...
 
bool CheckMutable (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a pointer points to a mutable field. More...
 
bool CheckLoad (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a value can be loaded from a block. More...
 
bool CheckStore (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a value can be stored in a block. More...
 
bool CheckInvoke (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a method can be invoked on an object. More...
 
bool CheckInit (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a value can be initialized. More...
 
bool CheckCallable (InterpState &S, CodePtr OpPC, Function *F)
 Checks if a method can be called. More...
 
bool CheckThis (InterpState &S, CodePtr OpPC, const Pointer &This)
 Checks the 'this' pointer. More...
 
bool CheckPure (InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD)
 Checks if a method is pure virtual. More...
 
bool Interpret (InterpState &S, APValue &Result)
 Interpreter entry point. More...
 
template<typename T >
bool ReturnValue (const T &V, APValue &R)
 Convert a value to an APValue. More...
 
template<typename T >
bool IsTrue (const T &V)
 
template<typename T , bool(*)(T, T, unsigned, T *) OpFW, template< typename U > class OpAP>
bool AddSubMulHelper (InterpState &S, CodePtr OpPC, unsigned Bits, const T &LHS, const T &RHS)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Add (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Sub (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Mul (InterpState &S, CodePtr OpPC)
 
template<typename T >
bool CmpHelper (InterpState &S, CodePtr OpPC, CompareFn Fn)
 
template<typename T >
bool CmpHelperEQ (InterpState &S, CodePtr OpPC, CompareFn Fn)
 
template<>
bool CmpHelper< Pointer > (InterpState &S, CodePtr OpPC, CompareFn Fn)
 
template<>
bool CmpHelperEQ< Pointer > (InterpState &S, CodePtr OpPC, CompareFn Fn)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool EQ (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool NE (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool LT (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool LE (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool GT (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool GE (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool InRange (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Dup (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Pop (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Const (InterpState &S, CodePtr OpPC, const T &Arg)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool GetLocal (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool SetLocal (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool GetParam (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool SetParam (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool GetField (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool SetField (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool GetFieldPop (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool GetThisField (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool SetThisField (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool GetGlobal (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool SetGlobal (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool InitGlobal (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool InitThisField (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool InitThisBitField (InterpState &S, CodePtr OpPC, const Record::Field *F)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool InitThisFieldActive (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool InitField (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool InitBitField (InterpState &S, CodePtr OpPC, const Record::Field *F)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool InitFieldActive (InterpState &S, CodePtr OpPC, uint32_t I)
 
bool GetPtrLocal (InterpState &S, CodePtr OpPC, uint32_t I)
 
bool GetPtrParam (InterpState &S, CodePtr OpPC, uint32_t I)
 
bool GetPtrGlobal (InterpState &S, CodePtr OpPC, uint32_t I)
 
bool GetPtrField (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool GetPtrThisField (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool GetPtrActiveField (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool GetPtrActiveThisField (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool GetPtrBase (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool GetPtrThisBase (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool VirtBaseHelper (InterpState &S, CodePtr OpPC, const RecordDecl *Decl, const Pointer &Ptr)
 
bool GetPtrVirtBase (InterpState &S, CodePtr OpPC, const RecordDecl *D)
 
bool GetPtrThisVirtBase (InterpState &S, CodePtr OpPC, const RecordDecl *D)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Load (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool LoadPop (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Store (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool StorePop (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool StoreBitField (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool StoreBitFieldPop (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool InitPop (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool InitElem (InterpState &S, CodePtr OpPC, uint32_t Idx)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool InitElemPop (InterpState &S, CodePtr OpPC, uint32_t Idx)
 
template<class T , bool Add>
bool OffsetHelper (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool AddOffset (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool SubOffset (InterpState &S, CodePtr OpPC)
 
bool Destroy (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType TIn, PrimType TOut>
bool Cast (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Zero (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Null (InterpState &S, CodePtr OpPC)
 
bool This (InterpState &S, CodePtr OpPC)
 
template<PrimType TR, PrimType TL, class T = typename PrimConv<TR>::T>
unsigned Trunc (InterpState &S, CodePtr OpPC, unsigned Bits, const T &V)
 
template<PrimType TL, PrimType TR, typename T = typename PrimConv<TL>::T>
bool ShiftRight (InterpState &S, CodePtr OpPC, const T &V, unsigned RHS)
 
template<PrimType TL, PrimType TR, typename T = typename PrimConv<TL>::T>
bool ShiftLeft (InterpState &S, CodePtr OpPC, const T &V, unsigned RHS)
 
template<PrimType TL, PrimType TR>
bool Shr (InterpState &S, CodePtr OpPC)
 
template<PrimType TL, PrimType TR>
bool Shl (InterpState &S, CodePtr OpPC)
 
bool NoRet (InterpState &S, CodePtr OpPC)
 
bool NarrowPtr (InterpState &S, CodePtr OpPC)
 
bool ExpandPtr (InterpState &S, CodePtr OpPC)
 
template<typename T >
std::enable_if_t<!std::is_pointer< T >::value, T > ReadArg (InterpState &S, CodePtr OpPC)
 
template<typename T >
std::enable_if_t< std::is_pointer< T >::value, T > ReadArg (InterpState &S, CodePtr OpPC)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, const Pointer &P)
 
size_t primSize (PrimType Type)
 Returns the size of a primitive type in bytes. More...
 
constexpr size_t align (size_t Size)
 Aligns a size to the pointer alignment. More...
 
bool isPrimitiveIntegral (PrimType Type)
 

Typedef Documentation

◆ APInt

typedef llvm::APInt clang::interp::APInt

Definition at line 27 of file Integral.h.

◆ APSInt

typedef llvm::APSInt clang::interp::APSInt

Definition at line 28 of file Integral.h.

◆ BlockCtorFn

using clang::interp::BlockCtorFn = typedef void (*)(Block *Storage, char *FieldPtr, bool IsConst, bool IsMutable, bool IsActive, Descriptor *FieldDesc)

Invoked whenever a block is created.

The constructor method fills in the inline descriptors of all fields and array elements. It also initializes all the fields which contain non-trivial types.

Definition at line 33 of file Descriptor.h.

◆ BlockDtorFn

using clang::interp::BlockDtorFn = typedef void (*)(Block *Storage, char *FieldPtr, Descriptor *FieldDesc)

Invoked when a block is destroyed.

Invokes the destructors of all non-trivial nested fields of arrays and records.

Definition at line 38 of file Descriptor.h.

◆ BlockMoveFn

using clang::interp::BlockMoveFn = typedef void (*)(Block *Storage, char *SrcFieldPtr, char *DstFieldPtr, Descriptor *FieldDesc)

Invoked when a block with pointers referencing it goes out of scope.

Such blocks are persisted: the move function copies all inline descriptors and non-trivial fields, as existing pointers might need to reference those descriptors. Data is not copied since it cannot be legally read.

Definition at line 45 of file Descriptor.h.

◆ CompareFn

using clang::interp::CompareFn = typedef llvm::function_ref<bool(ComparisonCategoryResult)>

Definition at line 161 of file Interp.h.

◆ DeclTy

using clang::interp::DeclTy = typedef unsigned llvm::PointerUnion<const Decl *, const Expr *>

Definition at line 26 of file Descriptor.h.

◆ InterpSize

Object size as used by the interpreter.

Definition at line 48 of file Descriptor.h.

◆ SourceMap

using clang::interp::SourceMap = typedef std::vector<std::pair<unsigned, SourceInfo> >

Definition at line 84 of file Source.h.

Enumeration Type Documentation

◆ Opcode

enum clang::interp::Opcode : uint32_t

Definition at line 21 of file Opcode.h.

◆ PrimType

Enumeration of the primitive types of the VM.

Enumerator
PT_Sint8 
PT_Uint8 
PT_Sint16 
PT_Uint16 
PT_Sint32 
PT_Uint32 
PT_Sint64 
PT_Uint64 
PT_Bool 
PT_Ptr 

Definition at line 27 of file PrimType.h.

Function Documentation

◆ Add()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Add ( InterpState S,
CodePtr  OpPC 
)

◆ AddOffset()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::AddOffset ( InterpState S,
CodePtr  OpPC 
)

◆ AddSubMulHelper()

template<typename T , bool(*)(T, T, unsigned, T *) OpFW, template< typename U > class OpAP>
bool clang::interp::AddSubMulHelper ( InterpState S,
CodePtr  OpPC,
unsigned  Bits,
const T &  LHS,
const T &  RHS 
)

Definition at line 103 of file Interp.h.

◆ align()

constexpr size_t clang::interp::align ( size_t  Size)
constexpr

◆ Cast()

template<PrimType TIn, PrimType TOut>
bool clang::interp::Cast ( InterpState S,
CodePtr  OpPC 
)

◆ CheckArray()

bool clang::interp::CheckArray ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr 
)

Checks if the array is offsetable.

Definition at line 194 of file Interp.cpp.

◆ CheckCallable()

bool clang::interp::CheckCallable ( InterpState S,
CodePtr  OpPC,
Function F 
)

Checks if a method can be called.

Definition at line 333 of file Interp.cpp.

◆ CheckConst()

bool clang::interp::CheckConst ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr 
)

Checks if a pointer points to const storage.

Definition at line 258 of file Interp.cpp.

◆ CheckExtern()

bool clang::interp::CheckExtern ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr 
)

Checks if the variable has externally defined storage.

Definition at line 181 of file Interp.cpp.

◆ CheckInit()

bool clang::interp::CheckInit ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr 
)

Checks if a value can be initialized.

Definition at line 325 of file Interp.cpp.

◆ CheckInvoke()

bool clang::interp::CheckInvoke ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr 
)

Checks if a method can be invoked on an object.

Definition at line 315 of file Interp.cpp.

◆ CheckLive()

bool clang::interp::CheckLive ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr,
AccessKinds  AK 
)

Checks if a pointer is live and accessible.

Definition at line 202 of file Interp.cpp.

◆ CheckLoad()

bool clang::interp::CheckLoad ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr 
)

Checks if a value can be loaded from a block.

Definition at line 283 of file Interp.cpp.

◆ CheckMutable()

bool clang::interp::CheckMutable ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr 
)

Checks if a pointer points to a mutable field.

Definition at line 270 of file Interp.cpp.

◆ CheckNull()

bool clang::interp::CheckNull ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr,
CheckSubobjectKind  CSK 
)

Checks if a pointer is null.

Definition at line 231 of file Interp.cpp.

◆ CheckPure()

bool clang::interp::CheckPure ( InterpState S,
CodePtr  OpPC,
const CXXMethodDecl MD 
)

Checks if a method is pure virtual.

Definition at line 393 of file Interp.cpp.

◆ CheckRange() [1/2]

bool clang::interp::CheckRange ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr,
AccessKinds  AK 
)

Checks if a pointer is in range.

Definition at line 240 of file Interp.cpp.

◆ CheckRange() [2/2]

bool clang::interp::CheckRange ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr,
CheckSubobjectKind  CSK 
)

Checks if a field from which a pointer is going to be derived is valid.

Definition at line 249 of file Interp.cpp.

◆ CheckStore()

bool clang::interp::CheckStore ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr 
)

Checks if a value can be stored in a block.

Definition at line 301 of file Interp.cpp.

◆ CheckThis()

bool clang::interp::CheckThis ( InterpState S,
CodePtr  OpPC,
const Pointer This 
)

Checks the 'this' pointer.

Definition at line 375 of file Interp.cpp.

◆ CmpHelper()

template<typename T >
bool clang::interp::CmpHelper ( InterpState S,
CodePtr  OpPC,
CompareFn  Fn 
)

Definition at line 164 of file Interp.h.

◆ CmpHelper< Pointer >()

template<>
bool clang::interp::CmpHelper< Pointer > ( InterpState S,
CodePtr  OpPC,
CompareFn  Fn 
)
inline

Definition at line 178 of file Interp.h.

◆ CmpHelperEQ()

template<typename T >
bool clang::interp::CmpHelperEQ ( InterpState S,
CodePtr  OpPC,
CompareFn  Fn 
)

Definition at line 173 of file Interp.h.

◆ CmpHelperEQ< Pointer >()

template<>
bool clang::interp::CmpHelperEQ< Pointer > ( InterpState S,
CodePtr  OpPC,
CompareFn  Fn 
)
inline

Definition at line 196 of file Interp.h.

◆ Compare()

template<typename T >
ComparisonCategoryResult clang::interp::Compare ( const T &  X,
const T &  Y 
)

◆ Const()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Const ( InterpState S,
CodePtr  OpPC,
const T &  Arg 
)

◆ Destroy()

bool clang::interp::Destroy ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)
inline

Definition at line 793 of file Interp.h.

Referenced by pushTemporaryCleanup().

◆ Dup()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Dup ( InterpState S,
CodePtr  OpPC 
)

Definition at line 280 of file Interp.h.

◆ EQ()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::EQ ( InterpState S,
CodePtr  OpPC 
)

◆ ExpandPtr()

bool clang::interp::ExpandPtr ( InterpState S,
CodePtr  OpPC 
)
inline

Definition at line 947 of file Interp.h.

◆ GE()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GE ( InterpState S,
CodePtr  OpPC 
)

Definition at line 254 of file Interp.h.

Referenced by clang::Expr::isNullPointerConstant().

◆ GetField()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetField ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 333 of file Interp.h.

◆ GetFieldPop()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetFieldPop ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 362 of file Interp.h.

◆ GetGlobal()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetGlobal ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 405 of file Interp.h.

◆ GetLocal()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetLocal ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 306 of file Interp.h.

◆ GetParam()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetParam ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 318 of file Interp.h.

◆ GetPtrActiveField()

bool clang::interp::GetPtrActiveField ( InterpState S,
CodePtr  OpPC,
uint32_t  Off 
)
inline

Definition at line 541 of file Interp.h.

◆ GetPtrActiveThisField()

bool clang::interp::GetPtrActiveThisField ( InterpState S,
CodePtr  OpPC,
uint32_t  Off 
)
inline

Definition at line 554 of file Interp.h.

◆ GetPtrBase()

bool clang::interp::GetPtrBase ( InterpState S,
CodePtr  OpPC,
uint32_t  Off 
)
inline

Definition at line 567 of file Interp.h.

◆ GetPtrField()

bool clang::interp::GetPtrField ( InterpState S,
CodePtr  OpPC,
uint32_t  Off 
)
inline

Definition at line 519 of file Interp.h.

◆ GetPtrGlobal()

bool clang::interp::GetPtrGlobal ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)
inline

Definition at line 514 of file Interp.h.

◆ GetPtrLocal()

bool clang::interp::GetPtrLocal ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)
inline

Definition at line 501 of file Interp.h.

◆ GetPtrParam()

bool clang::interp::GetPtrParam ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)
inline

Definition at line 506 of file Interp.h.

◆ GetPtrThisBase()

bool clang::interp::GetPtrThisBase ( InterpState S,
CodePtr  OpPC,
uint32_t  Off 
)
inline

Definition at line 575 of file Interp.h.

◆ GetPtrThisField()

bool clang::interp::GetPtrThisField ( InterpState S,
CodePtr  OpPC,
uint32_t  Off 
)
inline

Definition at line 531 of file Interp.h.

◆ GetPtrThisVirtBase()

bool clang::interp::GetPtrThisVirtBase ( InterpState S,
CodePtr  OpPC,
const RecordDecl D 
)
inline

Definition at line 603 of file Interp.h.

◆ GetPtrVirtBase()

bool clang::interp::GetPtrVirtBase ( InterpState S,
CodePtr  OpPC,
const RecordDecl D 
)
inline

Definition at line 596 of file Interp.h.

◆ GetThisField()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GetThisField ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 376 of file Interp.h.

◆ GT()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::GT ( InterpState S,
CodePtr  OpPC 
)

Definition at line 247 of file Interp.h.

◆ InitBitField()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitBitField ( InterpState S,
CodePtr  OpPC,
const Record::Field F 
)

Definition at line 477 of file Interp.h.

◆ InitElem()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitElem ( InterpState S,
CodePtr  OpPC,
uint32_t  Idx 
)

Definition at line 695 of file Interp.h.

◆ InitElemPop()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitElemPop ( InterpState S,
CodePtr  OpPC,
uint32_t  Idx 
)

Definition at line 706 of file Interp.h.

◆ InitField()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitField ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

◆ InitFieldActive()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitFieldActive ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 487 of file Interp.h.

◆ InitGlobal()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitGlobal ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 420 of file Interp.h.

◆ InitPop()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitPop ( InterpState S,
CodePtr  OpPC 
)

Definition at line 684 of file Interp.h.

◆ InitThisBitField()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitThisBitField ( InterpState S,
CodePtr  OpPC,
const Record::Field F 
)

Definition at line 439 of file Interp.h.

◆ InitThisField()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitThisField ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 426 of file Interp.h.

◆ InitThisFieldActive()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InitThisFieldActive ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 453 of file Interp.h.

◆ InRange()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::InRange ( InterpState S,
CodePtr  OpPC 
)

◆ Interpret()

bool clang::interp::Interpret ( InterpState S,
APValue Result 
)

Interpreter entry point.

Definition at line 401 of file Interp.cpp.

◆ isPrimitiveIntegral()

bool clang::interp::isPrimitiveIntegral ( PrimType  Type)
inline

Definition at line 61 of file PrimType.h.

References PT_Bool, PT_Sint16, PT_Sint32, PT_Sint64, PT_Sint8, PT_Uint16, PT_Uint32, PT_Uint64, and PT_Uint8.

◆ IsTrue()

template<typename T >
bool clang::interp::IsTrue ( const T &  V)
inline

Definition at line 95 of file Interp.h.

References V.

◆ LE()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::LE ( InterpState S,
CodePtr  OpPC 
)

◆ Load()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Load ( InterpState S,
CodePtr  OpPC 
)

◆ LoadPop()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::LoadPop ( InterpState S,
CodePtr  OpPC 
)

Definition at line 627 of file Interp.h.

◆ LT()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::LT ( InterpState S,
CodePtr  OpPC 
)

◆ Mul()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Mul ( InterpState S,
CodePtr  OpPC 
)

◆ NarrowPtr()

bool clang::interp::NarrowPtr ( InterpState S,
CodePtr  OpPC 
)
inline

Definition at line 941 of file Interp.h.

◆ NE()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::NE ( InterpState S,
CodePtr  OpPC 
)

◆ NoRet()

bool clang::interp::NoRet ( InterpState S,
CodePtr  OpPC 
)
inline

Definition at line 931 of file Interp.h.

◆ Null()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Null ( InterpState S,
CodePtr  OpPC 
)
inline

◆ OffsetHelper()

template<class T , bool Add>
bool clang::interp::OffsetHelper ( InterpState S,
CodePtr  OpPC 
)

Definition at line 720 of file Interp.h.

◆ operator<<() [1/3]

llvm::raw_ostream& clang::interp::operator<< ( llvm::raw_ostream &  OS,
const Boolean B 
)
inline

Definition at line 139 of file Boolean.h.

References clang::interp::Boolean::print().

◆ operator<<() [2/3]

llvm::raw_ostream& clang::interp::operator<< ( llvm::raw_ostream &  OS,
const Pointer P 
)
inline

Definition at line 345 of file Pointer.h.

References P.

◆ operator<<() [3/3]

template<unsigned Bits, bool Signed>
llvm::raw_ostream& clang::interp::operator<< ( llvm::raw_ostream &  OS,
Integral< Bits, Signed >  I 
)

Definition at line 260 of file Integral.h.

References clang::interp::Integral< Bits, Signed >::print().

◆ Pop()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Pop ( InterpState S,
CodePtr  OpPC 
)

Definition at line 286 of file Interp.h.

◆ primSize()

size_t clang::interp::primSize ( PrimType  Type)

Returns the size of a primitive type in bytes.

Definition at line 17 of file PrimType.cpp.

References TYPE_SWITCH.

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

◆ ReadArg() [1/2]

template<typename T >
std::enable_if_t<!std::is_pointer<T>::value, T> clang::interp::ReadArg ( InterpState S,
CodePtr  OpPC 
)
inline

Definition at line 958 of file Interp.h.

◆ ReadArg() [2/2]

template<typename T >
std::enable_if_t<std::is_pointer<T>::value, T> clang::interp::ReadArg ( InterpState S,
CodePtr  OpPC 
)
inline

Definition at line 964 of file Interp.h.

◆ ReturnValue()

template<typename T >
bool clang::interp::ReturnValue ( const T &  V,
APValue R 
)

Convert a value to an APValue.

Definition at line 42 of file Interp.h.

References V.

Referenced by clang::CoroutineBodyStmt::getReturnValueInit().

◆ SetField()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::SetField ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 347 of file Interp.h.

◆ SetGlobal()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::SetGlobal ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 414 of file Interp.h.

◆ SetLocal()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::SetLocal ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 312 of file Interp.h.

◆ SetParam()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::SetParam ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 327 of file Interp.h.

◆ SetThisField()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::SetThisField ( InterpState S,
CodePtr  OpPC,
uint32_t  I 
)

Definition at line 390 of file Interp.h.

◆ ShiftLeft()

template<PrimType TL, PrimType TR, typename T = typename PrimConv<TL>::T>
bool clang::interp::ShiftLeft ( InterpState S,
CodePtr  OpPC,
const T &  V,
unsigned  RHS 
)
inline

Definition at line 873 of file Interp.h.

◆ ShiftRight()

template<PrimType TL, PrimType TR, typename T = typename PrimConv<TL>::T>
bool clang::interp::ShiftRight ( InterpState S,
CodePtr  OpPC,
const T &  V,
unsigned  RHS 
)
inline

Definition at line 863 of file Interp.h.

◆ Shl()

template<PrimType TL, PrimType TR>
bool clang::interp::Shl ( InterpState S,
CodePtr  OpPC 
)
inline

◆ Shr()

template<PrimType TL, PrimType TR>
bool clang::interp::Shr ( InterpState S,
CodePtr  OpPC 
)
inline

◆ Store()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Store ( InterpState S,
CodePtr  OpPC 
)

Definition at line 636 of file Interp.h.

◆ StoreBitField()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::StoreBitField ( InterpState S,
CodePtr  OpPC 
)

Definition at line 656 of file Interp.h.

◆ StoreBitFieldPop()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::StoreBitFieldPop ( InterpState S,
CodePtr  OpPC 
)

Definition at line 670 of file Interp.h.

◆ StorePop()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::StorePop ( InterpState S,
CodePtr  OpPC 
)

Definition at line 646 of file Interp.h.

◆ Sub()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Sub ( InterpState S,
CodePtr  OpPC 
)

◆ SubOffset()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::SubOffset ( InterpState S,
CodePtr  OpPC 
)

Definition at line 784 of file Interp.h.

◆ This()

bool clang::interp::This ( InterpState S,
CodePtr  OpPC 
)
inline

Definition at line 829 of file Interp.h.

Referenced by clang::CodeGen::CGCXXABI::adjustThisArgumentForVirtualFunctionCall(), clang::Sema::BuildCXXThisExpr(), clang::Sema::CheckDestructor(), checkDynamicType(), CheckLiteralType(), checkNonVirtualMemberCallThisPointer(), commonEmitCXXMemberOrOperatorCall(), ComputeDynamicType(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitLambdaToBlockPointerConversion(), clang::Sema::DefineImplicitMoveAssignment(), clang::interp::InterpFrame::describe(), clang::CodeGen::CodeGenFunction::EmitCastLValue(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXDestructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberOrOperatorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CodeGenFunction::EmitDelegateCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitInheritedCXXConstructorCall(), clang::CodeGen::CGCXXABI::EmitLoadOfMemberFunctionPointer(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtorCall(), clang::CodeGen::CodeGenFunction::EmitVTableAssumptionLoad(), clang::CodeGen::CodeGenFunction::EmitVTableAssumptionLoads(), EvaluateArray(), EvaluateArrayNewConstructExpr(), EvaluateArrayNewInitList(), EvaluateAtomic(), EvaluateInPlace(), EvaluateObjectArgument(), EvaluateRecord(), clang::CodeGen::CodeGenFunction::FieldConstructionScope::FieldConstructionScope(), findMetaClassAlloc(), clang::CodeGen::CodeGenFunction::GetAddressOfDirectBaseInCompleteClass(), clang::ento::RetainSummary::getThisEffect(), clang::CodeGen::CodeGenFunction::GetVTablePtr(), HandleConstructorCall(), HandleDestruction(), HandleDestructionImpl(), HandleFunctionCall(), HandleVirtualDispatch(), clang::Expr::isImplicitCXXThis(), clang::ento::RetainSummary::isNoop(), clang::ComparisonCategories::lookupInfo(), clang::Sema::MarkThisReferenced(), clang::OMPClauseWithPostUpdate::OMPClauseWithPostUpdate(), clang::OMPClauseWithPreInit::OMPClauseWithPreInit(), clang::ento::RetainSummary::operator==(), clang::ento::ExprEngine::processCallExit(), clang::ento::RetainSummary::Profile(), clang::ento::RetainSummary::setThisEffect(), clang::TreeTransform< Derived >::TransformFunctionProtoType(), and clang::interp::InterpFrame::~InterpFrame().

◆ Trunc()

template<PrimType TR, PrimType TL, class T = typename PrimConv<TR>::T>
unsigned clang::interp::Trunc ( InterpState S,
CodePtr  OpPC,
unsigned  Bits,
const T &  V 
)

Definition at line 848 of file Interp.h.

◆ VirtBaseHelper()

bool clang::interp::VirtBaseHelper ( InterpState S,
CodePtr  OpPC,
const RecordDecl Decl,
const Pointer Ptr 
)
inline

Definition at line 585 of file Interp.h.

◆ Zero()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Zero ( InterpState S,
CodePtr  OpPC 
)