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

Classes

class  ArrayIndexScope
 
class  AutoScope
 Like a regular LocalScope, except that the destructors of all local variables are automatically emitted when the AutoScope is destroyed. More...
 
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  DestructorScope
 Emits the destructors of the variables of. More...
 
class  EvalEmitter
 An emitter which evaluates opcodes as they are emitted. More...
 
class  EvaluationResult
 Defines the result of an evaluation. More...
 
class  ExprScope
 Expression scope which tracks potentially lifetime extended temporaries which are hoisted to the parent scope on exit. More...
 
class  Floating
 
class  Frame
 Base class for stack frames, shared between VM and walker. More...
 
class  Function
 Bytecode function. More...
 
class  FunctionPointer
 
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  IntegralAP
 
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
 Generic scope for local variables. More...
 
class  LoopScope
 Sets the context for break/continue statements. More...
 
class  OptionScope
 Scope used to handle initialization methods. More...
 
struct  ParamOffset
 
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_Float >
 
struct  PrimConv< PT_FnPtr >
 
struct  PrimConv< PT_IntAP >
 
struct  PrimConv< PT_IntAPS >
 
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...
 
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  SourceLocScope
 
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 = llvm::PointerUnion< const Decl *, const Expr * >
 
using InitMapPtr = std::optional< std::pair< bool, std::shared_ptr< InitMap > > >
 
using BlockCtorFn = void(*)(Block *Storage, std::byte *FieldPtr, bool IsConst, bool IsMutable, bool IsActive, const Descriptor *FieldDesc)
 Invoked whenever a block is created.
 
using BlockDtorFn = void(*)(Block *Storage, std::byte *FieldPtr, const Descriptor *FieldDesc)
 Invoked when a block is destroyed.
 
using BlockMoveFn = void(*)(Block *Storage, const std::byte *SrcFieldPtr, std::byte *DstFieldPtr, const Descriptor *FieldDesc)
 Invoked when a block with pointers referencing it goes out of scope.
 
using APFloat = llvm::APFloat
 
using APSInt = llvm::APSInt
 
using APInt = llvm::APInt
 
using CompareFn = llvm::function_ref< bool(ComparisonCategoryResult)>
 
using SourceMap = std::vector< std::pair< unsigned, SourceInfo > >
 

Enumerations

enum class  ArithOp { Add , Sub }
 
enum class  PushVal : bool { No , Yes }
 
enum class  IncDecOp { Inc , Dec }
 
enum  Opcode : uint32_t
 
enum  PrimType : unsigned {
  PT_Sint8 , PT_Uint8 , PT_Sint16 , PT_Uint16 ,
  PT_Sint32 , PT_Uint32 , PT_Sint64 , PT_Uint64 ,
  PT_IntAP , PT_IntAPS , PT_Bool , PT_Float ,
  PT_Ptr , PT_FnPtr
}
 Enumeration of the primitive types of the VM. More...
 
enum class  CastKind : uint8_t { Reinterpret , Atomic }
 

Functions

llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, const Boolean &B)
 
static void DiagnoseUninitializedSubobject (InterpState &S, SourceLocation Loc, const FieldDecl *SubObjDecl)
 
static bool CheckFieldsInitialized (InterpState &S, SourceLocation Loc, const Pointer &BasePtr, const Record *R)
 
static bool CheckArrayInitialized (InterpState &S, SourceLocation Loc, const Pointer &BasePtr, const ConstantArrayType *CAT)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, Floating F)
 
Floating getSwappedBytes (Floating F)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, FunctionPointer FP)
 
template<unsigned Bits, bool Signed>
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, Integral< Bits, Signed > I)
 
template<bool Signed>
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, IntegralAP< Signed > I)
 
template<bool Signed>
IntegralAP< SignedgetSwappedBytes (IntegralAP< Signed > F)
 
static void popArg (InterpState &S, const Expr *Arg)
 
void cleanupAfterFunctionCall (InterpState &S, CodePtr OpPC)
 
bool CheckExtern (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if the variable has externally defined storage.
 
bool CheckArray (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if the array is offsetable.
 
bool CheckLive (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
 Checks if a pointer is live and accessible.
 
bool CheckConstant (InterpState &S, CodePtr OpPC, const Descriptor *Desc)
 Checks if the Descriptor is of a constexpr or const global variable.
 
static bool CheckConstant (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 
bool CheckDummy (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a pointer is a dummy pointer.
 
bool CheckNull (InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK)
 Checks if a pointer is null.
 
bool CheckRange (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
 Checks if a pointer is in range.
 
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.
 
bool CheckSubobject (InterpState &S, CodePtr OpPC, const Pointer &Ptr, CheckSubobjectKind CSK)
 Checks if Ptr is a one-past-the-end pointer.
 
bool CheckConst (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a pointer points to const storage.
 
bool CheckMutable (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a pointer points to a mutable field.
 
bool CheckInitialized (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
 
bool CheckGlobalInitialized (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Check if a global variable is initialized.
 
bool CheckLoad (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a value can be loaded from a block.
 
bool CheckStore (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a value can be stored in a block.
 
bool CheckInvoke (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a method can be invoked on an object.
 
bool CheckInit (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a value can be initialized.
 
bool CheckCallable (InterpState &S, CodePtr OpPC, const Function *F)
 Checks if a method can be called.
 
bool CheckCallDepth (InterpState &S, CodePtr OpPC)
 Checks if calling the currently active function would exceed the allowed call depth.
 
bool CheckThis (InterpState &S, CodePtr OpPC, const Pointer &This)
 Checks the 'this' pointer.
 
bool CheckPure (InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD)
 Checks if a method is pure virtual.
 
bool CheckFloatResult (InterpState &S, CodePtr OpPC, const Floating &Result, APFloat::opStatus Status)
 Checks if the result of a floating-point operation is valid in the current context.
 
bool CheckDeclRef (InterpState &S, CodePtr OpPC, const DeclRefExpr *DR)
 We aleady know the given DeclRefExpr is invalid for some reason, now figure out why and print appropriate diagnostics.
 
bool Interpret (InterpState &S, APValue &Result)
 Interpreter entry point.
 
template<typename T >
bool ReturnValue (const T &V, APValue &R)
 Convert a value to an APValue.
 
bool SetThreeWayComparisonField (InterpState &S, CodePtr OpPC, const Pointer &Ptr, const APSInt &IntValue)
 Sets the given integral value to the pointer, which is of a std::{weak,partial,strong}_ordering type.
 
template<typename LT , typename RT >
bool CheckShift (InterpState &S, CodePtr OpPC, const LT &LHS, const RT &RHS, unsigned Bits)
 Checks if the shift operation is legal.
 
template<typename T >
bool CheckDivRem (InterpState &S, CodePtr OpPC, const T &LHS, const T &RHS)
 Checks if Div/Rem operation on LHS and RHS is valid.
 
bool InterpretBuiltin (InterpState &S, CodePtr OpPC, const Function *F, const CallExpr *Call)
 Interpret a builtin function.
 
bool InterpretOffsetOf (InterpState &S, CodePtr OpPC, const OffsetOfExpr *E, llvm::ArrayRef< int64_t > ArrayIndices, int64_t &Result)
 Interpret an offsetof operation.
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Ret (InterpState &S, CodePtr &PC, APValue &Result)
 
bool RetVoid (InterpState &S, CodePtr &PC, APValue &Result)
 
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)
 
bool Addf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Sub (InterpState &S, CodePtr OpPC)
 
bool Subf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Mul (InterpState &S, CodePtr OpPC)
 
bool Mulf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool BitAnd (InterpState &S, CodePtr OpPC)
 1) Pops the RHS from the stack.
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool BitOr (InterpState &S, CodePtr OpPC)
 1) Pops the RHS from the stack.
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool BitXor (InterpState &S, CodePtr OpPC)
 1) Pops the RHS from the stack.
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Rem (InterpState &S, CodePtr OpPC)
 1) Pops the RHS from the stack.
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Div (InterpState &S, CodePtr OpPC)
 1) Pops the RHS from the stack.
 
bool Divf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Inv (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Neg (InterpState &S, CodePtr OpPC)
 
template<typename T , IncDecOp Op, PushVal DoPush>
bool IncDecHelper (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Inc (InterpState &S, CodePtr OpPC)
 1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value increased by one back to the pointer 4) Pushes the original (pre-inc) value on the stack.
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool IncPop (InterpState &S, CodePtr OpPC)
 1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value increased by one back to the pointer
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Dec (InterpState &S, CodePtr OpPC)
 1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value decreased by one back to the pointer 4) Pushes the original (pre-dec) value on the stack.
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool DecPop (InterpState &S, CodePtr OpPC)
 1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value decreased by one back to the pointer
 
template<IncDecOp Op, PushVal DoPush>
bool IncDecFloatHelper (InterpState &S, CodePtr OpPC, const Pointer &Ptr, llvm::RoundingMode RM)
 
bool Incf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM)
 
bool IncfPop (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM)
 
bool Decf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM)
 
bool DecfPop (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Comp (InterpState &S, CodePtr OpPC)
 1) Pops the value from the stack.
 
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< FunctionPointer > (InterpState &S, CodePtr OpPC, CompareFn Fn)
 Function pointers cannot be compared in an ordered way.
 
template<>
bool CmpHelperEQ< FunctionPointer > (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 CMP3 (InterpState &S, CodePtr OpPC, const ComparisonCategoryInfo *CmpInfo)
 
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)
 1) Pops the value from the stack.
 
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)
 1) Peeks a pointer on the stack 2) Pushes the value of the pointer's field on the stack
 
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)
 1) Pops a pointer from the stack 2) Pushes the value of the pointer's field on the stack
 
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 GetGlobalUnchecked (InterpState &S, CodePtr OpPC, uint32_t I)
 Same as GetGlobal, but without the checks.
 
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 InitGlobalTemp (InterpState &S, CodePtr OpPC, uint32_t I, const LifetimeExtendedTemporaryDecl *Temp)
 1) Converts the value on top of the stack to an APValue 2) Sets that APValue on \Temp 3) Initialized global with index \I with that
 
bool InitGlobalTempComp (InterpState &S, CodePtr OpPC, const LifetimeExtendedTemporaryDecl *Temp)
 1) Converts the value on top of the stack to an APValue 2) Sets that APValue on \Temp 3) Initialized global with index \I with that
 
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, uint32_t FieldOffset)
 
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)
 1) Pops the value from the stack 2) Peeks a pointer from the stack 3) Pushes the value to field I of the pointer on the stack
 
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)
 1) Pops a Pointer from the stack 2) Pushes Pointer.atField(Off) on the stack
 
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 GetPtrDerivedPop (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool GetPtrBase (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool GetPtrBasePop (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool GetPtrThisBase (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool InitPtrPop (InterpState &S, CodePtr OpPC)
 
bool InitPtr (InterpState &S, CodePtr OpPC)
 
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)
 1) Pops the value from the stack 2) Peeks a pointer and gets its index \Idx 3) Sets the value on the pointer, leaving the pointer on the stack.
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool InitElemPop (InterpState &S, CodePtr OpPC, uint32_t Idx)
 The same as InitElem, but pops the pointer as well.
 
template<class T , ArithOp Op>
bool OffsetHelper (InterpState &S, CodePtr OpPC, const T &Offset, const Pointer &Ptr)
 
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)
 
template<ArithOp Op>
static bool IncDecPtrHelper (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 
static bool IncPtr (InterpState &S, CodePtr OpPC)
 
static bool DecPtr (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool SubPtr (InterpState &S, CodePtr OpPC)
 1) Pops a Pointer from the stack.
 
bool Destroy (InterpState &S, CodePtr OpPC, uint32_t I)
 
template<PrimType TIn, PrimType TOut>
bool Cast (InterpState &S, CodePtr OpPC)
 
bool CastFP (InterpState &S, CodePtr OpPC, const llvm::fltSemantics *Sem, llvm::RoundingMode RM)
 1) Pops a Floating from the stack.
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool CastAP (InterpState &S, CodePtr OpPC, uint32_t BitWidth)
 Like Cast(), but we cast to an arbitrary-bitwidth integral, so we need to know what bitwidth the result should be.
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool CastAPS (InterpState &S, CodePtr OpPC, uint32_t BitWidth)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool CastIntegralFloating (InterpState &S, CodePtr OpPC, const llvm::fltSemantics *Sem, llvm::RoundingMode RM)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool CastFloatingIntegral (InterpState &S, CodePtr OpPC)
 
static bool CastFloatingIntegralAP (InterpState &S, CodePtr OpPC, uint32_t BitWidth)
 
static bool CastFloatingIntegralAPS (InterpState &S, CodePtr OpPC, uint32_t BitWidth)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool CastPointerIntegral (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Zero (InterpState &S, CodePtr OpPC)
 
static bool ZeroIntAP (InterpState &S, CodePtr OpPC, uint32_t BitWidth)
 
static bool ZeroIntAPS (InterpState &S, CodePtr OpPC, uint32_t BitWidth)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Null (InterpState &S, CodePtr OpPC)
 
bool This (InterpState &S, CodePtr OpPC)
 
bool RVOPtr (InterpState &S, CodePtr OpPC)
 
template<PrimType NameL, PrimType NameR>
bool Shr (InterpState &S, CodePtr OpPC)
 
template<PrimType NameL, PrimType NameR>
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<PrimType Name, class T = typename PrimConv<Name>::T>
bool ArrayElemPtr (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool ArrayElemPtrPop (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool ArrayElemPop (InterpState &S, CodePtr OpPC, uint32_t Index)
 
bool ArrayDecay (InterpState &S, CodePtr OpPC)
 Just takes a pointer and checks if it's an incomplete array type.
 
bool CallVar (InterpState &S, CodePtr OpPC, const Function *Func, uint32_t VarArgSize)
 
bool Call (InterpState &S, CodePtr OpPC, const Function *Func, uint32_t VarArgSize)
 
bool CallVirt (InterpState &S, CodePtr OpPC, const Function *Func, uint32_t VarArgSize)
 
bool CallBI (InterpState &S, CodePtr &PC, const Function *Func, const CallExpr *CE)
 
bool CallPtr (InterpState &S, CodePtr OpPC, uint32_t ArgSize)
 
bool GetFnPtr (InterpState &S, CodePtr OpPC, const Function *Func)
 
bool Invalid (InterpState &S, CodePtr OpPC)
 Just emit a diagnostic.
 
bool InvalidCast (InterpState &S, CodePtr OpPC, CastKind Kind)
 Same here, but only for casts.
 
bool InvalidDeclRef (InterpState &S, CodePtr OpPC, const DeclRefExpr *DR)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool OffsetOf (InterpState &S, CodePtr OpPC, const OffsetOfExpr *E)
 
template<typename T >
ReadArg (InterpState &S, CodePtr &OpPC)
 
template<>
Floating ReadArg< Floating > (InterpState &S, CodePtr &OpPC)
 
template<>
IntegralAP< falseReadArg< IntegralAP< false > > (InterpState &S, CodePtr &OpPC)
 
template<>
IntegralAP< trueReadArg< IntegralAP< true > > (InterpState &S, CodePtr &OpPC)
 
template<typename T >
static T getParam (const InterpFrame *Frame, unsigned Index)
 
PrimType getIntPrimType (const InterpState &S)
 
PrimType getLongPrimType (const InterpState &S)
 
static APSInt peekToAPSInt (InterpStack &Stk, PrimType T, size_t Offset=0)
 Peek an integer value from the stack into an APSInt.
 
static void pushInt (InterpState &S, int32_t Val)
 Pushes Val to the stack, as a target-dependent 'int'.
 
static void pushAPSInt (InterpState &S, const APSInt &Val)
 
static void pushLong (InterpState &S, int64_t Val)
 Pushes Val to the stack, as a target-dependent 'long'.
 
static void pushSizeT (InterpState &S, uint64_t Val)
 
static void assignInteger (Pointer &Dest, PrimType ValueT, const APSInt &Value)
 
static bool retPrimValue (InterpState &S, CodePtr OpPC, APValue &Result, std::optional< PrimType > &T)
 
static bool interp__builtin_strcmp (InterpState &S, CodePtr OpPC, const InterpFrame *Frame)
 
static bool interp__builtin_strlen (InterpState &S, CodePtr OpPC, const InterpFrame *Frame)
 
static bool interp__builtin_nan (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, bool Signaling)
 
static bool interp__builtin_inf (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F)
 
static bool interp__builtin_copysign (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F)
 
static bool interp__builtin_fmin (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F)
 
static bool interp__builtin_fmax (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func)
 
static bool interp__builtin_isnan (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F)
 Defined as __builtin_isnan(...), to accommodate the fact that it can take a float, double, long double, etc.
 
static bool interp__builtin_issignaling (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F)
 
static bool interp__builtin_isinf (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, bool CheckSign)
 
static bool interp__builtin_isfinite (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F)
 
static bool interp__builtin_isnormal (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F)
 
static bool interp__builtin_issubnormal (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F)
 
static bool interp__builtin_iszero (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F)
 
static bool interp__builtin_isfpclass (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 First parameter to __builtin_isfpclass is the floating value, the second one is an integral value.
 
static bool interp__builtin_fpclassify (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func)
 Five int values followed by one floating value.
 
static bool interp__builtin_fabs (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func)
 
static bool interp__builtin_popcount (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_parity (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_clrsb (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_bitreverse (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_classify_type (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_expect (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_rotate (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call, bool Right)
 rotateleft(value, amount)
 
static bool interp__builtin_ffs (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_addressof (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_move (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_eh_return_data_regno (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_launder (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_overflowop (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_carryop (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 Three integral values followed by a pointer (lhs, rhs, carry, carryOut).
 
static bool interp__builtin_clz (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_ctz (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_bswap (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, const Pointer &P)
 
template<typename T >
ComparisonCategoryResult Compare (const T &X, const T &Y)
 Helper to compare two comparable types.
 
size_t primSize (PrimType Type)
 Returns the size of a primitive type in bytes.
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, interp::CastKind CK)
 
constexpr bool isIntegralType (PrimType T)
 
constexpr size_t align (size_t Size)
 Aligns a size to the pointer alignment.
 
constexpr bool aligned (uintptr_t Value)
 
static bool aligned (const void *P)
 

Typedef Documentation

◆ APFloat

using clang::interp::APFloat = typedef llvm::APFloat

Definition at line 23 of file Floating.h.

◆ APInt

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

Definition at line 29 of file Integral.h.

◆ APSInt

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

Definition at line 24 of file Floating.h.

◆ BlockCtorFn

using clang::interp::BlockCtorFn = typedef void (*)(Block *Storage, std::byte *FieldPtr, bool IsConst, bool IsMutable, bool IsActive, const 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, std::byte *FieldPtr, const Descriptor *FieldDesc)

Invoked when a block is destroyed.

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

Definition at line 39 of file Descriptor.h.

◆ BlockMoveFn

using clang::interp::BlockMoveFn = typedef void (*)(Block *Storage, const std::byte *SrcFieldPtr, std::byte *DstFieldPtr, const 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 46 of file Descriptor.h.

◆ CompareFn

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

Definition at line 692 of file Interp.h.

◆ DeclTy

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

Definition at line 27 of file Descriptor.h.

◆ InitMapPtr

using clang::interp::InitMapPtr = typedef std::optional<std::pair<bool, std::shared_ptr<InitMap> >>

Definition at line 28 of file Descriptor.h.

◆ SourceMap

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

Definition at line 91 of file Source.h.

Enumeration Type Documentation

◆ ArithOp

enum class clang::interp::ArithOp
strong
Enumerator
Add 
Sub 

Definition at line 198 of file Interp.h.

◆ CastKind

enum class clang::interp::CastKind : uint8_t
strong
Enumerator
Reinterpret 
Atomic 

Definition at line 49 of file PrimType.h.

◆ IncDecOp

enum class clang::interp::IncDecOp
strong
Enumerator
Inc 
Dec 

Definition at line 511 of file Interp.h.

◆ 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_IntAP 
PT_IntAPS 
PT_Bool 
PT_Float 
PT_Ptr 
PT_FnPtr 

Definition at line 32 of file PrimType.h.

◆ PushVal

enum class clang::interp::PushVal : bool
strong
Enumerator
No 
Yes 

Definition at line 507 of file Interp.h.

Function Documentation

◆ Add()

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

Definition at line 300 of file Interp.h.

◆ Addf()

bool clang::interp::Addf ( InterpState S,
CodePtr  OpPC,
llvm::RoundingMode  RM 
)
inline

Definition at line 307 of file Interp.h.

References clang::interp::Floating::add(), CheckFloatResult(), and clang::Result.

◆ AddOffset()

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

Definition at line 1513 of file Interp.h.

◆ 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 
)

◆ align()

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

◆ aligned() [1/2]

static bool clang::interp::aligned ( const void *  P)
inlinestatic

Definition at line 102 of file PrimType.h.

References aligned(), and P.

◆ aligned() [2/2]

constexpr bool clang::interp::aligned ( uintptr_t  Value)
constexpr

◆ ArrayDecay()

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

Just takes a pointer and checks if it's an incomplete array type.

Definition at line 1915 of file Interp.h.

References clang::interp::Pointer::atIndex(), clang::interp::Pointer::isDummy(), and clang::interp::Pointer::isUnknownSizeArray().

◆ ArrayElemPop()

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

◆ ArrayElemPtr()

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

Definition at line 1876 of file Interp.h.

References CheckDummy(), and NarrowPtr().

◆ ArrayElemPtrPop()

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

Definition at line 1890 of file Interp.h.

References CheckDummy(), and NarrowPtr().

◆ assignInteger()

static void clang::interp::assignInteger ( Pointer Dest,
PrimType  ValueT,
const APSInt Value 
)
static

◆ BitAnd()

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

1) Pops the RHS from the stack.

2) Pops the LHS from the stack. 3) Pushes 'LHS & RHS' on the stack

Definition at line 356 of file Interp.h.

References clang::Result.

◆ BitOr()

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

1) Pops the RHS from the stack.

2) Pops the LHS from the stack. 3) Pushes 'LHS | RHS' on the stack

Definition at line 373 of file Interp.h.

References clang::Result.

◆ BitXor()

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

1) Pops the RHS from the stack.

2) Pops the LHS from the stack. 3) Pushes 'LHS ^ RHS' on the stack

Definition at line 390 of file Interp.h.

References clang::Result.

◆ Call()

bool clang::interp::Call ( InterpState S,
CodePtr  OpPC,
const Function Func,
uint32_t  VarArgSize 
)
inline

◆ CallBI()

bool clang::interp::CallBI ( InterpState S,
CodePtr PC,
const Function Func,
const CallExpr CE 
)
inline

Definition at line 2071 of file Interp.h.

References clang::Func, and InterpretBuiltin().

◆ CallPtr()

bool clang::interp::CallPtr ( InterpState S,
CodePtr  OpPC,
uint32_t  ArgSize 
)
inline

Definition at line 2086 of file Interp.h.

References clang::Call, CallVirt(), and clang::interp::FunctionPointer::getFunction().

◆ CallVar()

bool clang::interp::CallVar ( InterpState S,
CodePtr  OpPC,
const Function Func,
uint32_t  VarArgSize 
)
inline

◆ CallVirt()

bool clang::interp::CallVirt ( InterpState S,
CodePtr  OpPC,
const Function Func,
uint32_t  VarArgSize 
)
inline

◆ Cast()

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

Definition at line 1605 of file Interp.h.

◆ CastAP()

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

Like Cast(), but we cast to an arbitrary-bitwidth integral, so we need to know what bitwidth the result should be.

Definition at line 1625 of file Interp.h.

References clang::interp::IntegralAP< Signed >::from().

◆ CastAPS()

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

Definition at line 1632 of file Interp.h.

References clang::interp::IntegralAP< Signed >::from().

◆ CastFloatingIntegral()

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

◆ CastFloatingIntegralAP()

static bool clang::interp::CastFloatingIntegralAP ( InterpState S,
CodePtr  OpPC,
uint32_t  BitWidth 
)
inlinestatic

◆ CastFloatingIntegralAPS()

static bool clang::interp::CastFloatingIntegralAPS ( InterpState S,
CodePtr  OpPC,
uint32_t  BitWidth 
)
inlinestatic

◆ CastFP()

bool clang::interp::CastFP ( InterpState S,
CodePtr  OpPC,
const llvm::fltSemantics *  Sem,
llvm::RoundingMode  RM 
)
inline

1) Pops a Floating from the stack.

2) Pushes a new floating on the stack that uses the given semantics.

Definition at line 1614 of file Interp.h.

References clang::Result, and clang::interp::Floating::toSemantics().

◆ CastIntegralFloating()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::CastIntegralFloating ( InterpState S,
CodePtr  OpPC,
const llvm::fltSemantics *  Sem,
llvm::RoundingMode  RM 
)

◆ CastPointerIntegral()

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

Definition at line 1723 of file Interp.h.

References clang::interp::Pointer::getIntegerRepresentation().

◆ CheckArray()

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

Checks if the array is offsetable.

Definition at line 209 of file Interp.cpp.

References clang::interp::Pointer::isUnknownSizeArray().

Referenced by interp__builtin_strlen(), and OffsetHelper().

◆ CheckArrayInitialized()

static bool clang::interp::CheckArrayInitialized ( InterpState S,
SourceLocation  Loc,
const Pointer BasePtr,
const ConstantArrayType CAT 
)
static

◆ CheckCallable()

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

◆ CheckCallDepth()

bool clang::interp::CheckCallDepth ( InterpState S,
CodePtr  OpPC 
)

Checks if calling the currently active function would exceed the allowed call depth.

Definition at line 510 of file Interp.cpp.

References clang::Sema::getLangOpts().

Referenced by Call(), and CallVar().

◆ CheckConst()

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

Checks if a pointer points to const storage.

Definition at line 326 of file Interp.cpp.

References clang::interp::Pointer::block(), clang::Func, clang::interp::Pointer::getType(), clang::interp::Pointer::isConst(), and clang::interp::Pointer::isLive().

Referenced by CheckStore().

◆ CheckConstant() [1/2]

bool clang::interp::CheckConstant ( InterpState S,
CodePtr  OpPC,
const Descriptor Desc 
)

◆ CheckConstant() [2/2]

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

Definition at line 281 of file Interp.cpp.

References CheckConstant(), and clang::interp::Pointer::getDeclDesc().

◆ CheckDeclRef()

bool clang::interp::CheckDeclRef ( InterpState S,
CodePtr  OpPC,
const DeclRefExpr DR 
)

We aleady know the given DeclRefExpr is invalid for some reason, now figure out why and print appropriate diagnostics.

Checks why the given DeclRefExpr is invalid.

Definition at line 597 of file Interp.cpp.

References diagnoseNonConstVariable(), clang::DeclRefExpr::getDecl(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), and clang::Decl::getSourceRange().

Referenced by InvalidDeclRef().

◆ CheckDivRem()

template<typename T >
bool clang::interp::CheckDivRem ( InterpState S,
CodePtr  OpPC,
const T &  LHS,
const T &  RHS 
)

Checks if Div/Rem operation on LHS and RHS is valid.

Definition at line 159 of file Interp.h.

References clang::Expr::getType(), and toString().

Referenced by Div(), Divf(), and Rem().

◆ CheckDummy()

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

Checks if a pointer is a dummy pointer.

Definition at line 285 of file Interp.cpp.

References clang::interp::Pointer::isDummy().

Referenced by ArrayElemPtr(), ArrayElemPtrPop(), CheckLoad(), CheckStore(), GetPtrField(), and interp__builtin_strlen().

◆ CheckExtern()

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

◆ CheckFieldsInitialized()

static bool clang::interp::CheckFieldsInitialized ( InterpState S,
SourceLocation  Loc,
const Pointer BasePtr,
const Record R 
)
static

◆ CheckFloatResult()

bool clang::interp::CheckFloatResult ( InterpState S,
CodePtr  OpPC,
const Floating Result,
APFloat::opStatus  Status 
)

◆ CheckGlobalInitialized()

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

◆ CheckInit()

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

Checks if a value can be initialized.

Definition at line 444 of file Interp.cpp.

References clang::AK_Assign, CheckLive(), and CheckRange().

Referenced by InitElem(), InitElemPop(), and InitPop().

◆ CheckInitialized()

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

◆ 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 434 of file Interp.cpp.

References clang::AK_MemberCall, CheckExtern(), CheckLive(), and CheckRange().

Referenced by Call(), and CallVar().

◆ CheckLive()

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

◆ CheckLoad()

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

◆ CheckMutable()

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

Checks if a pointer points to a mutable field.

Definition at line 345 of file Interp.cpp.

References clang::AK_Read, clang::interp::Pointer::getField(), clang::interp::Pointer::isLive(), and clang::interp::Pointer::isMutable().

Referenced by CheckLoad().

◆ CheckNull()

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

◆ CheckPure()

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

Checks if a method is pure virtual.

Definition at line 539 of file Interp.cpp.

References clang::Decl::getLocation(), and clang::FunctionDecl::isPureVirtual().

◆ CheckRange() [1/2]

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

◆ 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 307 of file Interp.cpp.

References clang::interp::Pointer::isElementPastEnd().

◆ CheckShift()

template<typename LT , typename RT >
bool clang::interp::CheckShift ( InterpState S,
CodePtr  OpPC,
const LT LHS,
const RT &  RHS,
unsigned  Bits 
)

Checks if the shift operation is legal.

Definition at line 123 of file Interp.h.

References clang::Expr::getType().

Referenced by Shl(), and Shr().

◆ 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 418 of file Interp.cpp.

References clang::AK_Assign, CheckConst(), CheckDummy(), CheckExtern(), CheckGlobal(), CheckLive(), and CheckRange().

Referenced by SetField(), SetThisField(), Store(), StoreBitField(), StoreBitFieldPop(), and StorePop().

◆ CheckSubobject()

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

Checks if Ptr is a one-past-the-end pointer.

Definition at line 316 of file Interp.cpp.

References clang::interp::Pointer::isOnePastEnd().

Referenced by GetPtrBase(), GetPtrBasePop(), GetPtrDerivedPop(), and GetPtrField().

◆ CheckThis()

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

◆ cleanupAfterFunctionCall()

void clang::interp::cleanupAfterFunctionCall ( InterpState S,
CodePtr  OpPC 
)

◆ CMP3()

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

◆ CmpHelper()

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

Definition at line 695 of file Interp.h.

◆ CmpHelper< FunctionPointer >()

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

Function pointers cannot be compared in an ordered way.

Definition at line 710 of file Interp.h.

References clang::interp::FunctionPointer::toDiagnosticString().

◆ CmpHelper< Pointer >()

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

◆ CmpHelperEQ()

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

Definition at line 704 of file Interp.h.

◆ CmpHelperEQ< FunctionPointer >()

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

◆ CmpHelperEQ< Pointer >()

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

◆ Comp()

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

1) Pops the value from the stack.

2) Pushes the bitwise complemented value on the stack (~V).

Definition at line 677 of file Interp.h.

References clang::Result.

◆ 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 
)

Definition at line 886 of file Interp.h.

◆ Dec()

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

1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value decreased by one back to the pointer 4) Pushes the original (pre-dec) value on the stack.

Definition at line 596 of file Interp.h.

References clang::AK_Decrement, and CheckInitialized().

◆ Decf()

bool clang::interp::Decf ( InterpState S,
CodePtr  OpPC,
llvm::RoundingMode  RM 
)
inline

Definition at line 656 of file Interp.h.

References clang::AK_Decrement, and CheckInitialized().

◆ DecfPop()

bool clang::interp::DecfPop ( InterpState S,
CodePtr  OpPC,
llvm::RoundingMode  RM 
)
inline

Definition at line 665 of file Interp.h.

References clang::AK_Decrement, and CheckInitialized().

◆ DecPop()

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

1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value decreased by one back to the pointer

Definition at line 609 of file Interp.h.

References clang::AK_Decrement, and CheckInitialized().

◆ DecPtr()

static bool clang::interp::DecPtr ( InterpState S,
CodePtr  OpPC 
)
inlinestatic

Definition at line 1560 of file Interp.h.

References clang::AK_Decrement, and CheckInitialized().

◆ Destroy()

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

Definition at line 1596 of file Interp.h.

◆ DiagnoseUninitializedSubobject()

static void clang::interp::DiagnoseUninitializedSubobject ( InterpState S,
SourceLocation  Loc,
const FieldDecl SubObjDecl 
)
static

Definition at line 53 of file EvaluationResult.cpp.

References clang::Decl::getLocation().

Referenced by CheckArrayInitialized(), and CheckFieldsInitialized().

◆ Div()

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

1) Pops the RHS from the stack.

2) Pops the LHS from the stack. 3) Pushes 'LHS / RHS' on the stack

Definition at line 427 of file Interp.h.

References CheckDivRem(), and clang::Result.

◆ Divf()

bool clang::interp::Divf ( InterpState S,
CodePtr  OpPC,
llvm::RoundingMode  RM 
)
inline

◆ Dup()

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

Definition at line 870 of file Interp.h.

◆ EQ()

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

Definition at line 784 of file Interp.h.

References clang::Equal.

◆ ExpandPtr()

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

Definition at line 1861 of file Interp.h.

References clang::interp::Pointer::expand().

◆ GE()

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

Definition at line 844 of file Interp.h.

References clang::Equal, and clang::Greater.

◆ GetField()

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

1) Peeks a pointer on the stack 2) Pushes the value of the pointer's field on the stack

Definition at line 931 of file Interp.h.

References clang::interp::Pointer::atField(), CheckLoad(), CheckNull(), CheckRange(), and clang::CSK_Field.

◆ GetFieldPop()

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

1) Pops a pointer from the stack 2) Pushes the value of the pointer's field on the stack

Definition at line 963 of file Interp.h.

References clang::interp::Pointer::atField(), CheckLoad(), CheckNull(), CheckRange(), and clang::CSK_Field.

◆ GetFnPtr()

bool clang::interp::GetFnPtr ( InterpState S,
CodePtr  OpPC,
const Function Func 
)
inline

Definition at line 2101 of file Interp.h.

References clang::Func.

◆ GetGlobal()

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

◆ GetGlobalUnchecked()

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

Same as GetGlobal, but without the checks.

Definition at line 1024 of file Interp.h.

◆ getIntPrimType()

PrimType clang::interp::getIntPrimType ( const InterpState S)

Definition at line 26 of file InterpBuiltin.cpp.

References clang::TargetInfo::getIntWidth(), PT_Sint16, and PT_Sint32.

Referenced by interp__builtin_fpclassify(), and pushInt().

◆ GetLocal()

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

Definition at line 896 of file Interp.h.

References CheckLoad(), and clang::interp::Pointer::deref().

◆ getLongPrimType()

PrimType clang::interp::getLongPrimType ( const InterpState S)

Definition at line 37 of file InterpBuiltin.cpp.

References clang::TargetInfo::getLongWidth(), PT_Sint16, PT_Sint32, and PT_Sint64.

Referenced by interp__builtin_expect(), and pushLong().

◆ getParam()

template<typename T >
static T clang::interp::getParam ( const InterpFrame Frame,
unsigned  Index 
)
static

Definition at line 20 of file InterpBuiltin.cpp.

◆ GetParam()

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

Definition at line 914 of file Interp.h.

◆ GetPtrActiveField()

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

◆ GetPtrActiveThisField()

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

Definition at line 1225 of file Interp.h.

References CheckThis(), and This().

◆ GetPtrBase()

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

◆ GetPtrBasePop()

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

◆ GetPtrDerivedPop()

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

◆ GetPtrField()

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

1) Pops a Pointer from the stack 2) Pushes Pointer.atField(Off) on the stack

Definition at line 1184 of file Interp.h.

References clang::interp::Pointer::atField(), CheckDummy(), CheckExtern(), CheckNull(), CheckRange(), CheckSubobject(), and clang::CSK_Field.

◆ GetPtrGlobal()

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

Definition at line 1177 of file Interp.h.

◆ GetPtrLocal()

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

Definition at line 1164 of file Interp.h.

◆ GetPtrParam()

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

Definition at line 1169 of file Interp.h.

◆ GetPtrThisBase()

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

Definition at line 1268 of file Interp.h.

References CheckThis(), and This().

◆ GetPtrThisField()

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

Definition at line 1202 of file Interp.h.

References CheckThis(), and This().

◆ GetPtrThisVirtBase()

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

Definition at line 1311 of file Interp.h.

References CheckThis(), This(), and VirtBaseHelper().

◆ GetPtrVirtBase()

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

Definition at line 1304 of file Interp.h.

References CheckNull(), clang::CSK_Base, and VirtBaseHelper().

◆ getSwappedBytes() [1/2]

Floating clang::interp::getSwappedBytes ( Floating  F)

Definition at line 19 of file Floating.cpp.

◆ getSwappedBytes() [2/2]

template<bool Signed>
IntegralAP< Signed > clang::interp::getSwappedBytes ( IntegralAP< Signed F)

Definition at line 318 of file IntegralAP.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 977 of file Interp.h.

References CheckLoad(), CheckThis(), and This().

◆ GT()

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

Definition at line 837 of file Interp.h.

References clang::Greater.

◆ Inc()

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

1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value increased by one back to the pointer 4) Pushes the original (pre-inc) value on the stack.

Definition at line 569 of file Interp.h.

References clang::AK_Increment, and CheckInitialized().

◆ IncDecFloatHelper()

template<IncDecOp Op, PushVal DoPush>
bool clang::interp::IncDecFloatHelper ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr,
llvm::RoundingMode  RM 
)

◆ IncDecHelper()

template<typename T , IncDecOp Op, PushVal DoPush>
bool clang::interp::IncDecHelper ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr 
)

◆ IncDecPtrHelper()

template<ArithOp Op>
static bool clang::interp::IncDecPtrHelper ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr 
)
inlinestatic

◆ Incf()

bool clang::interp::Incf ( InterpState S,
CodePtr  OpPC,
llvm::RoundingMode  RM 
)
inline

Definition at line 638 of file Interp.h.

References clang::AK_Increment, and CheckInitialized().

◆ IncfPop()

bool clang::interp::IncfPop ( InterpState S,
CodePtr  OpPC,
llvm::RoundingMode  RM 
)
inline

Definition at line 647 of file Interp.h.

References clang::AK_Increment, and CheckInitialized().

◆ IncPop()

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

1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value increased by one back to the pointer

Definition at line 582 of file Interp.h.

References clang::AK_Increment, and CheckInitialized().

◆ IncPtr()

static bool clang::interp::IncPtr ( InterpState S,
CodePtr  OpPC 
)
inlinestatic

Definition at line 1551 of file Interp.h.

References clang::AK_Increment, and CheckInitialized().

◆ InitBitField()

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

◆ InitElem()

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

1) Pops the value from the stack 2) Peeks a pointer and gets its index \Idx 3) Sets the value on the pointer, leaving the pointer on the stack.

Definition at line 1412 of file Interp.h.

References CheckInit().

◆ InitElemPop()

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

The same as InitElem, but pops the pointer as well.

Definition at line 1424 of file Interp.h.

References CheckInit().

◆ InitField()

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

1) Pops the value from the stack 2) Peeks a pointer from the stack 3) Pushes the value to field I of the pointer on the stack

Definition at line 1129 of file Interp.h.

◆ InitFieldActive()

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

Definition at line 1150 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 1037 of file Interp.h.

References P.

◆ InitGlobalTemp()

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

1) Converts the value on top of the stack to an APValue 2) Sets that APValue on \Temp 3) Initialized global with index \I with that

Definition at line 1048 of file Interp.h.

References clang::LifetimeExtendedTemporaryDecl::getOrCreateValue(), and P.

◆ InitGlobalTempComp()

bool clang::interp::InitGlobalTempComp ( InterpState S,
CodePtr  OpPC,
const LifetimeExtendedTemporaryDecl Temp 
)
inline

1) Converts the value on top of the stack to an APValue 2) Sets that APValue on \Temp 3) Initialized global with index \I with that

Definition at line 1066 of file Interp.h.

References clang::LifetimeExtendedTemporaryDecl::getOrCreateValue(), and P.

◆ InitPop()

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

Definition at line 1398 of file Interp.h.

References CheckInit(), and clang::interp::Pointer::initialize().

◆ InitPtr()

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

◆ InitPtrPop()

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

◆ InitThisBitField()

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

◆ InitThisField()

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

Definition at line 1081 of file Interp.h.

References CheckThis(), and This().

◆ InitThisFieldActive()

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

Definition at line 1112 of file Interp.h.

References CheckThis(), and This().

◆ InRange()

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

Definition at line 856 of file Interp.h.

◆ interp__builtin_addressof()

static bool clang::interp::interp__builtin_addressof ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 623 of file InterpBuiltin.cpp.

References clang::Call, PT_FnPtr, and PT_Ptr.

Referenced by InterpretBuiltin().

◆ interp__builtin_bitreverse()

static bool clang::interp::interp__builtin_bitreverse ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 544 of file InterpBuiltin.cpp.

References clang::Call, peekToAPSInt(), and pushAPSInt().

Referenced by InterpretBuiltin().

◆ interp__builtin_bswap()

static bool clang::interp::interp__builtin_bswap ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 877 of file InterpBuiltin.cpp.

References clang::Call, INT_TYPE_SWITCH, and peekToAPSInt().

Referenced by InterpretBuiltin().

◆ interp__builtin_carryop()

static bool clang::interp::interp__builtin_carryop ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Three integral values followed by a pointer (lhs, rhs, carry, carryOut).

Definition at line 783 of file InterpBuiltin.cpp.

References align(), assignInteger(), clang::Call, clang::Func, clang::interp::Pointer::initialize(), peekToAPSInt(), primSize(), PT_Ptr, pushAPSInt(), and clang::Result.

Referenced by InterpretBuiltin().

◆ interp__builtin_classify_type()

static bool clang::interp::interp__builtin_classify_type ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

◆ interp__builtin_clrsb()

static bool clang::interp::interp__builtin_clrsb ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 535 of file InterpBuiltin.cpp.

References clang::Call, peekToAPSInt(), and pushInt().

Referenced by InterpretBuiltin().

◆ interp__builtin_clz()

static bool clang::interp::interp__builtin_clz ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 844 of file InterpBuiltin.cpp.

References clang::Call, clang::Func, peekToAPSInt(), and pushInt().

Referenced by InterpretBuiltin().

◆ interp__builtin_copysign()

static bool clang::interp::interp__builtin_copysign ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F 
)
static

Definition at line 330 of file InterpBuiltin.cpp.

References clang::Copy, and clang::interp::Floating::getAPFloat().

Referenced by InterpretBuiltin().

◆ interp__builtin_ctz()

static bool clang::interp::interp__builtin_ctz ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 864 of file InterpBuiltin.cpp.

References clang::Call, peekToAPSInt(), and pushInt().

Referenced by InterpretBuiltin().

◆ interp__builtin_eh_return_data_regno()

static bool clang::interp::interp__builtin_eh_return_data_regno ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 653 of file InterpBuiltin.cpp.

References clang::Call, peekToAPSInt(), pushInt(), and clang::Result.

Referenced by InterpretBuiltin().

◆ interp__builtin_expect()

static bool clang::interp::interp__builtin_expect ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

◆ interp__builtin_fabs()

static bool clang::interp::interp__builtin_fabs ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func 
)
static

Definition at line 507 of file InterpBuiltin.cpp.

References clang::interp::Floating::abs().

Referenced by InterpretBuiltin().

◆ interp__builtin_ffs()

static bool clang::interp::interp__builtin_ffs ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 612 of file InterpBuiltin.cpp.

References clang::Call, peekToAPSInt(), and pushInt().

Referenced by InterpretBuiltin().

◆ interp__builtin_fmax()

static bool clang::interp::interp__builtin_fmax ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func 
)
static

◆ interp__builtin_fmin()

static bool clang::interp::interp__builtin_fmin ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F 
)
static

◆ interp__builtin_fpclassify()

static bool clang::interp::interp__builtin_fpclassify ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func 
)
static

Five int values followed by one floating value.

Definition at line 470 of file InterpBuiltin.cpp.

References align(), clang::interp::Floating::getCategory(), getIntPrimType(), clang::interp::Floating::isDenormal(), peekToAPSInt(), primSize(), PT_Float, and pushInt().

Referenced by InterpretBuiltin().

◆ interp__builtin_inf()

static bool clang::interp::interp__builtin_inf ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F 
)
static

◆ interp__builtin_isfinite()

static bool clang::interp::interp__builtin_isfinite ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F 
)
static

Definition at line 415 of file InterpBuiltin.cpp.

References clang::interp::Floating::isFinite(), and pushInt().

Referenced by InterpretBuiltin().

◆ interp__builtin_isfpclass()

static bool clang::interp::interp__builtin_isfpclass ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

First parameter to __builtin_isfpclass is the floating value, the second one is an integral value.

Definition at line 453 of file InterpBuiltin.cpp.

References align(), clang::Call, clang::interp::Floating::classify(), peekToAPSInt(), primSize(), PT_Float, pushInt(), and clang::Result.

Referenced by InterpretBuiltin().

◆ interp__builtin_isinf()

static bool clang::interp::interp__builtin_isinf ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F,
bool  CheckSign 
)
static

◆ interp__builtin_isnan()

static bool clang::interp::interp__builtin_isnan ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F 
)
static

Defined as __builtin_isnan(...), to accommodate the fact that it can take a float, double, long double, etc.

But for us, that's all a Floating anyway.

Definition at line 385 of file InterpBuiltin.cpp.

References clang::interp::Floating::isNan(), and pushInt().

Referenced by InterpretBuiltin().

◆ interp__builtin_isnormal()

static bool clang::interp::interp__builtin_isnormal ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F 
)
static

Definition at line 424 of file InterpBuiltin.cpp.

References clang::interp::Floating::isNormal(), and pushInt().

Referenced by InterpretBuiltin().

◆ interp__builtin_issignaling()

static bool clang::interp::interp__builtin_issignaling ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F 
)
static

Definition at line 393 of file InterpBuiltin.cpp.

References clang::interp::Floating::isSignaling(), and pushInt().

Referenced by InterpretBuiltin().

◆ interp__builtin_issubnormal()

static bool clang::interp::interp__builtin_issubnormal ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F 
)
static

Definition at line 433 of file InterpBuiltin.cpp.

References clang::interp::Floating::isDenormal(), and pushInt().

Referenced by InterpretBuiltin().

◆ interp__builtin_iszero()

static bool clang::interp::interp__builtin_iszero ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F 
)
static

Definition at line 442 of file InterpBuiltin.cpp.

References clang::interp::Floating::isZero(), and pushInt().

Referenced by InterpretBuiltin().

◆ interp__builtin_launder()

static bool clang::interp::interp__builtin_launder ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 666 of file InterpBuiltin.cpp.

Referenced by InterpretBuiltin().

◆ interp__builtin_move()

static bool clang::interp::interp__builtin_move ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 642 of file InterpBuiltin.cpp.

References clang::Call, clang::Func, PT_Ptr, and TYPE_SWITCH.

Referenced by InterpretBuiltin().

◆ interp__builtin_nan()

static bool clang::interp::interp__builtin_nan ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F,
bool  Signaling 
)
static

◆ interp__builtin_overflowop()

static bool clang::interp::interp__builtin_overflowop ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

◆ interp__builtin_parity()

static bool clang::interp::interp__builtin_parity ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 526 of file InterpBuiltin.cpp.

References clang::Call, peekToAPSInt(), and pushInt().

Referenced by InterpretBuiltin().

◆ interp__builtin_popcount()

static bool clang::interp::interp__builtin_popcount ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
static

Definition at line 516 of file InterpBuiltin.cpp.

References clang::Call, peekToAPSInt(), and pushInt().

Referenced by InterpretBuiltin().

◆ interp__builtin_rotate()

static bool clang::interp::interp__builtin_rotate ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call,
bool  Right 
)
static

rotateleft(value, amount)

Definition at line 590 of file InterpBuiltin.cpp.

References align(), clang::Call, peekToAPSInt(), primSize(), pushAPSInt(), and clang::Result.

Referenced by InterpretBuiltin().

◆ interp__builtin_strcmp()

static bool clang::interp::interp__builtin_strcmp ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame 
)
static

◆ interp__builtin_strlen()

static bool clang::interp::interp__builtin_strlen ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame 
)
static

◆ Interpret()

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

Interpreter entry point.

Definition at line 625 of file Interp.cpp.

References clang::interp::CodePtr::read().

Referenced by Call(), and CallVar().

◆ InterpretBuiltin()

bool clang::interp::InterpretBuiltin ( InterpState S,
CodePtr  OpPC,
const Function F,
const CallExpr Call 
)

◆ InterpretOffsetOf()

bool clang::interp::InterpretOffsetOf ( InterpState S,
CodePtr  OpPC,
const OffsetOfExpr E,
llvm::ArrayRef< int64_t >  ArrayIndices,
int64_t &  Result 
)

◆ Inv()

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

Definition at line 461 of file Interp.h.

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

◆ Invalid()

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

Just emit a diagnostic.

The expression that caused emission of this op is not valid in a constant context.

Definition at line 2109 of file Interp.h.

◆ InvalidCast()

bool clang::interp::InvalidCast ( InterpState S,
CodePtr  OpPC,
CastKind  Kind 
)
inline

Same here, but only for casts.

Definition at line 2117 of file Interp.h.

References Reinterpret.

◆ InvalidDeclRef()

bool clang::interp::InvalidDeclRef ( InterpState S,
CodePtr  OpPC,
const DeclRefExpr DR 
)
inline

Definition at line 2127 of file Interp.h.

References CheckDeclRef().

◆ isIntegralType()

constexpr bool clang::interp::isIntegralType ( PrimType  T)
constexpr

Definition at line 66 of file PrimType.h.

References PT_Bool.

Referenced by Neg().

◆ LE()

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

Definition at line 829 of file Interp.h.

References clang::Equal, and clang::Less.

Referenced by clang::interp::ByteCodeExprGen< Emitter >::VisitIntegerLiteral().

◆ Load()

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

Definition at line 1326 of file Interp.h.

References CheckLoad(), and clang::interp::Pointer::deref().

◆ LoadPop()

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

Definition at line 1335 of file Interp.h.

References CheckLoad(), and clang::interp::Pointer::deref().

◆ LT()

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

Definition at line 822 of file Interp.h.

References clang::Less.

◆ Mul()

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

Definition at line 336 of file Interp.h.

◆ Mulf()

bool clang::interp::Mulf ( InterpState S,
CodePtr  OpPC,
llvm::RoundingMode  RM 
)
inline

Definition at line 343 of file Interp.h.

References CheckFloatResult(), clang::interp::Floating::mul(), and clang::Result.

◆ NarrowPtr()

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

Definition at line 1855 of file Interp.h.

References clang::interp::Pointer::narrow().

Referenced by ArrayElemPtr(), and ArrayElemPtrPop().

◆ NE()

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

Definition at line 815 of file Interp.h.

References clang::Equal.

Referenced by ctorArrayTy(), dtorArrayTy(), and moveArrayTy().

◆ Neg()

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

◆ NoRet()

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

Definition at line 1845 of file Interp.h.

◆ Null()

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

Definition at line 1755 of file Interp.h.

◆ OffsetHelper()

template<class T , ArithOp Op>
bool clang::interp::OffsetHelper ( InterpState S,
CodePtr  OpPC,
const T &  Offset,
const Pointer Ptr 
)

◆ OffsetOf()

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

◆ operator<<() [1/7]

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

Definition at line 156 of file Boolean.h.

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

◆ operator<<() [2/7]

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

Definition at line 497 of file Pointer.h.

References P.

◆ operator<<() [3/7]

llvm::raw_ostream & clang::interp::operator<< ( llvm::raw_ostream &  OS,
Floating  F 
)

Definition at line 14 of file Floating.cpp.

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

◆ operator<<() [4/7]

llvm::raw_ostream & clang::interp::operator<< ( llvm::raw_ostream &  OS,
FunctionPointer  FP 
)
inline

Definition at line 62 of file FunctionPointer.h.

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

◆ operator<<() [5/7]

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

Definition at line 299 of file Integral.h.

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

◆ operator<<() [6/7]

template<bool Signed>
llvm::raw_ostream & clang::interp::operator<< ( llvm::raw_ostream &  OS,
IntegralAP< Signed I 
)
inline

Definition at line 311 of file IntegralAP.h.

References clang::interp::IntegralAP< Signed >::print().

◆ operator<<() [7/7]

llvm::raw_ostream & clang::interp::operator<< ( llvm::raw_ostream &  OS,
interp::CastKind  CK 
)
inline

Definition at line 53 of file PrimType.h.

References Atomic, and Reinterpret.

◆ peekToAPSInt()

static APSInt clang::interp::peekToAPSInt ( InterpStack Stk,
PrimType  T,
size_t  Offset = 0 
)
static

◆ Pop()

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

Definition at line 876 of file Interp.h.

◆ popArg()

static void clang::interp::popArg ( InterpState S,
const Expr Arg 
)
static

Definition at line 143 of file Interp.cpp.

References PT_Ptr, and TYPE_SWITCH.

Referenced by cleanupAfterFunctionCall().

◆ primSize()

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

◆ pushAPSInt()

static void clang::interp::pushAPSInt ( InterpState S,
const APSInt Val 
)
static

◆ pushInt()

static void clang::interp::pushInt ( InterpState S,
int32_t  Val 
)
static

◆ pushLong()

static void clang::interp::pushLong ( InterpState S,
int64_t  Val 
)
static

Pushes Val to the stack, as a target-dependent 'long'.

Definition at line 127 of file InterpBuiltin.cpp.

References clang::interp::Integral< Bits, Signed >::from(), getLongPrimType(), PT_Sint16, PT_Sint32, and PT_Sint64.

Referenced by interp__builtin_expect().

◆ pushSizeT()

static void clang::interp::pushSizeT ( InterpState S,
uint64_t  Val 
)
static

◆ ReadArg()

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

Definition at line 2152 of file Interp.h.

References ID, and clang::interp::CodePtr::read().

◆ ReadArg< Floating >()

template<>
Floating clang::interp::ReadArg< Floating > ( InterpState S,
CodePtr OpPC 
)
inline

◆ ReadArg< IntegralAP< false > >()

template<>
IntegralAP< false > clang::interp::ReadArg< IntegralAP< false > > ( InterpState S,
CodePtr OpPC 
)
inline

Definition at line 2161 of file Interp.h.

◆ ReadArg< IntegralAP< true > >()

template<>
IntegralAP< true > clang::interp::ReadArg< IntegralAP< true > > ( InterpState S,
CodePtr OpPC 
)
inline

Definition at line 2161 of file Interp.h.

◆ Rem()

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

1) Pops the RHS from the stack.

2) Pops the LHS from the stack. 3) Pushes 'LHS % RHS' on the stack (the remainder of dividing LHS by RHS).

Definition at line 407 of file Interp.h.

References CheckDivRem(), and clang::Result.

◆ Ret()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::Ret ( InterpState S,
CodePtr PC,
APValue Result 
)

Definition at line 207 of file Interp.h.

References cleanupAfterFunctionCall(), clang::Result, and Ret().

Referenced by Ret().

◆ retPrimValue()

static bool clang::interp::retPrimValue ( InterpState S,
CodePtr  OpPC,
APValue Result,
std::optional< PrimType > &  T 
)
static

◆ ReturnValue()

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

Convert a value to an APValue.

Definition at line 43 of file Interp.h.

References V.

◆ RetVoid()

bool clang::interp::RetVoid ( InterpState S,
CodePtr PC,
APValue Result 
)
inline

Definition at line 241 of file Interp.h.

References cleanupAfterFunctionCall().

Referenced by retPrimValue().

◆ RVOPtr()

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

Definition at line 1778 of file Interp.h.

◆ SetField()

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

Definition at line 945 of file Interp.h.

References CheckNull(), CheckRange(), CheckStore(), and clang::CSK_Field.

◆ SetGlobal()

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

Definition at line 1031 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 
)

1) Pops the value from the stack.

2) Writes the value to the local variable with the given offset.

Definition at line 908 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 923 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 991 of file Interp.h.

References CheckStore(), CheckThis(), and This().

◆ SetThreeWayComparisonField()

bool clang::interp::SetThreeWayComparisonField ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr,
const APSInt IntValue 
)

◆ Shl()

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

Definition at line 1816 of file Interp.h.

References CheckShift(), and LT.

◆ Shr()

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

Definition at line 1791 of file Interp.h.

References CheckShift(), and LT.

◆ Store()

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

Definition at line 1344 of file Interp.h.

References CheckStore(), and clang::interp::Pointer::initialize().

◆ StoreBitField()

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

Definition at line 1368 of file Interp.h.

References CheckStore(), and clang::interp::Pointer::initialize().

◆ StoreBitFieldPop()

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

Definition at line 1383 of file Interp.h.

References CheckStore(), and clang::interp::Pointer::initialize().

◆ StorePop()

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

Definition at line 1356 of file Interp.h.

References CheckStore(), and clang::interp::Pointer::initialize().

◆ Sub()

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

Definition at line 318 of file Interp.h.

◆ Subf()

bool clang::interp::Subf ( InterpState S,
CodePtr  OpPC,
llvm::RoundingMode  RM 
)
inline

Definition at line 325 of file Interp.h.

References CheckFloatResult(), clang::Result, and clang::interp::Floating::sub().

◆ SubOffset()

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

Definition at line 1520 of file Interp.h.

◆ SubPtr()

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

1) Pops a Pointer from the stack.

2) Pops another Pointer from the stack. 3) Pushes the different of the indices of the two pointers on the stack.

Definition at line 1573 of file Interp.h.

References clang::interp::Pointer::getIndex(), clang::interp::Pointer::hasSameBase(), and clang::interp::Pointer::isZero().

◆ This()

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

◆ VirtBaseHelper()

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

Definition at line 1293 of file Interp.h.

Referenced by GetPtrThisVirtBase(), and GetPtrVirtBase().

◆ Zero()

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

Definition at line 1739 of file Interp.h.

References Zero().

Referenced by Zero().

◆ ZeroIntAP()

static bool clang::interp::ZeroIntAP ( InterpState S,
CodePtr  OpPC,
uint32_t  BitWidth 
)
inlinestatic

Definition at line 1744 of file Interp.h.

References clang::interp::IntegralAP< Signed >::zero().

◆ ZeroIntAPS()

static bool clang::interp::ZeroIntAPS ( InterpState S,
CodePtr  OpPC,
uint32_t  BitWidth 
)
inlinestatic

Definition at line 1749 of file Interp.h.

References clang::interp::IntegralAP< Signed >::zero().