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

Classes

class  ArrayIndexScope
 
struct  BitcastBuffer
 Track what bits have been initialized to known values and which ones have indeterminate value. More...
 
struct  BitRange
 A bit range. Both Start and End are inclusive. More...
 
struct  Bits
 A quantity in bits. More...
 
class  Block
 A memory block, either on the stack or in the heap. More...
 
struct  BlockPointer
 
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...
 
struct  Bytes
 A quantity in bytes. More...
 
class  CodePtr
 Pointer into the code segment. More...
 
class  Compiler
 Compilation context for expressions. 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
 
class  DynamicAllocator
 Manages dynamic memory allocations done during bytecode interpretation. More...
 
class  EvalEmitter
 An emitter which evaluates opcodes as they are emitted. More...
 
class  EvaluationResult
 Defines the result of an evaluation. More...
 
class  FixedPoint
 Wrapper around fixed point types. More...
 
class  Floating
 
class  Frame
 Base class for stack frames, shared between VM and walker. More...
 
class  Function
 Bytecode function. More...
 
class  FunctionPointer
 
struct  GlobalInlineDescriptor
 Descriptor used for global variables. More...
 
struct  InitLink
 
class  InitLinkScope
 
struct  InitMap
 Bitfield tracking the initialisation status of elements of primitive arrays. More...
 
class  InitStackScope
 
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  InterpStateCCOverride
 
struct  IntPointer
 
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  MemberPointer
 
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_FixedPoint >
 
struct  PrimConv< PT_Float >
 
struct  PrimConv< PT_FnPtr >
 
struct  PrimConv< PT_IntAP >
 
struct  PrimConv< PT_IntAPS >
 
struct  PrimConv< PT_MemberPtr >
 
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  StmtExprScope
 
class  SwitchScope
 
struct  VarCreationState
 State encapsulating if a the variable creation has been successful, unsuccessful, or no variable has been created at all. More...
 
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, bool InUnion, 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, std::byte *SrcFieldPtr, std::byte *DstFieldPtr, const Descriptor *FieldDesc)
 Invoked when a block with pointers referencing it goes out of scope.
 
using APInt = llvm::APInt
 
using APSInt = llvm::APSInt
 
using APFloat = llvm::APFloat
 
using FunctionDeclTy = llvm::PointerUnion< const FunctionDecl *, const BlockExpr * >
 
using FixedPointSemantics = llvm::FixedPointSemantics
 
using CompareFn = llvm::function_ref< bool(ComparisonCategoryResult)>
 
using SourceMap = std::vector< std::pair< unsigned, SourceInfo > >
 

Enumerations

enum class  Endian { Little , Big }
 
enum class  GlobalInitState { Initialized , NoInitializer , InitializerFailed }
 
enum class  ShiftDir { Left , Right }
 
enum class  ArithOp { Add , Sub }
 
enum class  PushVal : bool { No , Yes }
 
enum class  IncDecOp { Inc , Dec }
 
enum  Opcode : uint32_t
 
enum class  Storage { Block , Int , Fn }
 
enum  PrimType : unsigned {
  PT_Sint8 = 0 , PT_Uint8 = 1 , PT_Sint16 = 2 , PT_Uint16 = 3 ,
  PT_Sint32 = 4 , PT_Uint32 = 5 , PT_Sint64 = 6 , PT_Uint64 = 7 ,
  PT_IntAP = 8 , PT_IntAPS = 9 , PT_Bool = 10 , PT_FixedPoint = 11 ,
  PT_Float = 12 , PT_Ptr = 13 , PT_FnPtr = 14 , PT_MemberPtr = 15
}
 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)
 
static void collectBlocks (const Pointer &Ptr, llvm::SetVector< const Block * > &Blocks)
 
FixedPoint getSwappedBytes (FixedPoint F)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, FixedPoint F)
 
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, const Function *Func)
 
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 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 CheckDowncast (InterpState &S, CodePtr OpPC, const Pointer &Ptr, uint32_t Offset)
 Checks if the dowcast using the given offset is possible with the given 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.
 
static bool CheckVolatile (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
 
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.
 
static bool CheckWeak (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 
bool CheckLoad (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK=AK_Read)
 Checks if a value can be loaded from a block.
 
bool CheckFinalLoad (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 This is not used by any of the opcodes directly.
 
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, FPOptions FPO)
 Checks if the result of a floating-point operation is valid in the current context.
 
bool CheckDynamicMemoryAllocation (InterpState &S, CodePtr OpPC)
 Checks if dynamic memory allocation is available in the current language mode.
 
bool CheckNewDeleteForms (InterpState &S, CodePtr OpPC, DynamicAllocator::Form AllocForm, DynamicAllocator::Form DeleteForm, const Descriptor *D, const Expr *NewExpr)
 Diagnose mismatched new[]/delete or new/delete[] pairs.
 
bool CheckDeleteSource (InterpState &S, CodePtr OpPC, const Expr *Source, const Pointer &Ptr)
 Check the source of the pointer passed to delete/delete[] has actually been heap allocated by us.
 
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 CheckDummy (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
 Checks if a pointer is a dummy pointer.
 
bool CheckNonNullArgs (InterpState &S, CodePtr OpPC, const Function *F, const CallExpr *CE, unsigned ArgSize)
 Checks if all the arguments annotated as 'nonnull' are in fact not null.
 
static bool runRecordDestructor (InterpState &S, CodePtr OpPC, const Pointer &BasePtr, const Descriptor *Desc)
 
static bool RunDestructors (InterpState &S, CodePtr OpPC, const Block *B)
 
static bool hasVirtualDestructor (QualType T)
 
bool Free (InterpState &S, CodePtr OpPC, bool DeleteIsArrayForm, bool IsGlobalDelete)
 
void diagnoseEnumValue (InterpState &S, CodePtr OpPC, const EnumDecl *ED, const APSInt &Value)
 
bool CheckLiteralType (InterpState &S, CodePtr OpPC, const Type *T)
 
static bool checkConstructor (InterpState &S, CodePtr OpPC, const Function *Func, const Pointer &ThisPtr)
 
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 OpPC, const Function *Func, const CallExpr *CE, uint32_t BuiltinID)
 
bool CallPtr (InterpState &S, CodePtr OpPC, uint32_t ArgSize, const CallExpr *CE)
 
bool CheckNewTypeMismatch (InterpState &S, CodePtr OpPC, const Expr *E, std::optional< uint64_t > ArraySize=std::nullopt)
 Check if the initializer and storage types of a placement-new expression match.
 
bool InvalidNewDeleteExpr (InterpState &S, CodePtr OpPC, const Expr *E)
 
bool handleFixedPointOverflow (InterpState &S, CodePtr OpPC, const FixedPoint &FP)
 
bool InvalidShuffleVectorIndex (InterpState &S, CodePtr OpPC, uint32_t Index)
 
bool CheckPointerToIntegralCast (InterpState &S, CodePtr OpPC, const Pointer &Ptr, unsigned BitWidth)
 
bool CastPointerIntegralAP (InterpState &S, CodePtr OpPC, uint32_t BitWidth)
 
bool CastPointerIntegralAPS (InterpState &S, CodePtr OpPC, uint32_t BitWidth)
 
bool CheckBitCast (InterpState &S, CodePtr OpPC, bool HasIndeterminateBits, bool TargetIsUCharOrByte)
 
bool Interpret (InterpState &S)
 Interpreter entry point.
 
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.
 
bool DoMemcpy (InterpState &S, CodePtr OpPC, const Pointer &Src, Pointer &Dest)
 Copy the contents of Src into Dest.
 
template<typename T >
static bool handleOverflow (InterpState &S, CodePtr OpPC, const T &SrcValue)
 
template<ShiftDir Dir, 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.
 
template<typename SizeT >
bool CheckArraySize (InterpState &S, CodePtr OpPC, SizeT *NumElements, unsigned ElemSize, bool IsNoThrow)
 
bool InterpretBuiltin (InterpState &S, CodePtr OpPC, const Function *F, const CallExpr *Call, uint32_t BuiltinID)
 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.
 
bool Invalid (InterpState &S, CodePtr OpPC)
 Just emit a diagnostic.
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Ret (InterpState &S, CodePtr &PC)
 
bool RetVoid (InterpState &S, CodePtr &PC)
 
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)
 
static llvm::RoundingMode getRoundingMode (FPOptions FPO)
 
bool Addf (InterpState &S, CodePtr OpPC, uint32_t FPOI)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Sub (InterpState &S, CodePtr OpPC)
 
bool Subf (InterpState &S, CodePtr OpPC, uint32_t FPOI)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Mul (InterpState &S, CodePtr OpPC)
 
bool Mulf (InterpState &S, CodePtr OpPC, uint32_t FPOI)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Mulc (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Divc (InterpState &S, CodePtr OpPC)
 
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, uint32_t FPOI)
 
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, uint32_t FPOI)
 
bool Incf (InterpState &S, CodePtr OpPC, uint32_t FPOI)
 
bool IncfPop (InterpState &S, CodePtr OpPC, uint32_t FPOI)
 
bool Decf (InterpState &S, CodePtr OpPC, uint32_t FPOI)
 
bool DecfPop (InterpState &S, CodePtr OpPC, uint32_t FPOI)
 
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<>
bool CmpHelperEQ< MemberPointer > (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 TopName, PrimType BottomName>
bool Flip (InterpState &S, CodePtr OpPC)
 [Value1, Value2] -> [Value2, Value1]
 
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) Initializes 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 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)
 
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) Peeks a Pointer 2) Pushes Pointer.atField(Off) on the stack
 
bool GetPtrFieldPop (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 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 GetMemberPtrBasePop (InterpState &S, CodePtr OpPC, int32_t Off)
 
bool GetPtrThisBase (InterpState &S, CodePtr OpPC, uint32_t Off)
 
bool FinishInitPop (InterpState &S, CodePtr OpPC)
 
bool FinishInit (InterpState &S, CodePtr OpPC)
 
bool Dump (InterpState &S, CodePtr OpPC)
 
bool VirtBaseHelper (InterpState &S, CodePtr OpPC, const RecordDecl *Decl, const Pointer &Ptr)
 
bool GetPtrVirtBasePop (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 Init (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.
 
bool Memcpy (InterpState &S, CodePtr OpPC)
 
bool ToMemberPtr (InterpState &S, CodePtr OpPC)
 
bool CastMemberPtrPtr (InterpState &S, CodePtr OpPC)
 
template<class T , ArithOp Op>
bool OffsetHelper (InterpState &S, CodePtr OpPC, const T &Offset, const Pointer &Ptr, bool IsPointerArith=false)
 
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)
 
bool InitScope (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.
 
bool CastFixedPoint (InterpState &S, CodePtr OpPC, uint32_t FPS)
 
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, uint32_t FPOI)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool CastFloatingIntegral (InterpState &S, CodePtr OpPC, uint32_t FPOI)
 
static bool CastFloatingIntegralAP (InterpState &S, CodePtr OpPC, uint32_t BitWidth, uint32_t FPOI)
 
static bool CastFloatingIntegralAPS (InterpState &S, CodePtr OpPC, uint32_t BitWidth, uint32_t FPOI)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool CastPointerIntegral (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
static bool CastIntegralFixedPoint (InterpState &S, CodePtr OpPC, uint32_t FPS)
 
static bool CastFloatingFixedPoint (InterpState &S, CodePtr OpPC, uint32_t FPS)
 
static bool CastFixedPointFloating (InterpState &S, CodePtr OpPC, const llvm::fltSemantics *Sem)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
static bool CastFixedPointIntegral (InterpState &S, CodePtr OpPC)
 
static bool PtrPtrCast (InterpState &S, CodePtr OpPC, bool SrcIsVoidPtr)
 
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, uint64_t Value, const Descriptor *Desc)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool IsNonNull (InterpState &S, CodePtr OpPC)
 
bool This (InterpState &S, CodePtr OpPC)
 
bool RVOPtr (InterpState &S, CodePtr OpPC)
 
template<class LT , class RT , ShiftDir Dir>
bool DoShift (InterpState &S, CodePtr OpPC, LT &LHS, RT &RHS)
 
template<PrimType NameL, PrimType NameR>
bool Shr (InterpState &S, CodePtr OpPC)
 
template<PrimType NameL, PrimType NameR>
bool Shl (InterpState &S, CodePtr OpPC)
 
static bool ShiftFixedPoint (InterpState &S, CodePtr OpPC, bool Left)
 
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 ArrayElem (InterpState &S, CodePtr OpPC, uint32_t Index)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool ArrayElemPop (InterpState &S, CodePtr OpPC, uint32_t Index)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool CopyArray (InterpState &S, CodePtr OpPC, uint32_t SrcIndex, uint32_t DestIndex, uint32_t Size)
 
bool ArrayDecay (InterpState &S, CodePtr OpPC)
 Just takes a pointer and checks if it's an incomplete array type.
 
bool GetFnPtr (InterpState &S, CodePtr OpPC, const Function *Func)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool GetIntPtr (InterpState &S, CodePtr OpPC, const Descriptor *Desc)
 
bool GetMemberPtr (InterpState &S, CodePtr OpPC, const ValueDecl *D)
 
bool GetMemberPtrBase (InterpState &S, CodePtr OpPC)
 
bool GetMemberPtrDecl (InterpState &S, CodePtr OpPC)
 
bool Unsupported (InterpState &S, CodePtr OpPC)
 
bool Error (InterpState &S, CodePtr OpPC)
 Do nothing and just abort execution.
 
bool SideEffect (InterpState &S, CodePtr OpPC)
 
bool InvalidCast (InterpState &S, CodePtr OpPC, CastKind Kind, bool Fatal)
 Same here, but only for casts.
 
bool InvalidDeclRef (InterpState &S, CodePtr OpPC, const DeclRefExpr *DR, bool InitializerFailed)
 
bool SizelessVectorElementSize (InterpState &S, CodePtr OpPC)
 
bool Assume (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool OffsetOf (InterpState &S, CodePtr OpPC, const OffsetOfExpr *E)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool CheckNonNullArg (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool CheckEnumValue (InterpState &S, CodePtr OpPC, const EnumDecl *ED)
 
template<PrimType TIn, PrimType TOut>
bool DecayPtr (InterpState &S, CodePtr OpPC)
 OldPtr -> Integer -> NewPtr.
 
bool CheckDecl (InterpState &S, CodePtr OpPC, const VarDecl *VD)
 
bool Alloc (InterpState &S, CodePtr OpPC, const Descriptor *Desc)
 
template<PrimType Name, class SizeT = typename PrimConv<Name>::T>
bool AllocN (InterpState &S, CodePtr OpPC, PrimType T, const Expr *Source, bool IsNoThrow)
 
template<PrimType Name, class SizeT = typename PrimConv<Name>::T>
bool AllocCN (InterpState &S, CodePtr OpPC, const Descriptor *ElementDesc, bool IsNoThrow)
 
static bool IsConstantContext (InterpState &S, CodePtr OpPC)
 
static bool CheckAllocations (InterpState &S, CodePtr OpPC)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool CheckNewTypeMismatchArray (InterpState &S, CodePtr OpPC, const Expr *E)
 
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool BitCastPrim (InterpState &S, CodePtr OpPC, bool TargetIsUCharOrByte, uint32_t ResultBitWidth, const llvm::fltSemantics *Sem)
 
bool BitCast (InterpState &S, CodePtr OpPC)
 
template<typename T >
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)
 
static unsigned callArgSize (const InterpState &S, const CallExpr *C)
 
template<typename T >
static T getParam (const InterpFrame *Frame, unsigned Index)
 
static APSInt getAPSIntParam (const InterpFrame *Frame, unsigned Index)
 
static PrimType getIntPrimType (const InterpState &S)
 
static 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 pushInteger (InterpState &S, const APSInt &Val, QualType QT)
 Pushes Val on the stack as the type given by QT.
 
template<typename T >
static void pushInteger (InterpState &S, T Val, QualType QT)
 
static void assignInteger (Pointer &Dest, PrimType ValueT, const APSInt &Value)
 
static bool retPrimValue (InterpState &S, CodePtr OpPC, std::optional< PrimType > &T)
 
static void diagnoseNonConstexprBuiltin (InterpState &S, CodePtr OpPC, unsigned ID)
 
static bool interp__builtin_is_constant_evaluated (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
 
static bool interp__builtin_strcmp (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_strlen (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
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, bool IsNumBuiltin)
 
static bool interp__builtin_fmax (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, bool IsNumBuiltin)
 
static bool interp__builtin_isnan (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, const CallExpr *Call)
 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, const CallExpr *Call)
 
static bool interp__builtin_isinf (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, bool CheckSign, const CallExpr *Call)
 
static bool interp__builtin_isfinite (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, const CallExpr *Call)
 
static bool interp__builtin_isnormal (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, const CallExpr *Call)
 
static bool interp__builtin_issubnormal (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, const CallExpr *Call)
 
static bool interp__builtin_iszero (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, const CallExpr *Call)
 
static bool interp__builtin_signbit (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, const CallExpr *Call)
 
static bool interp_floating_comparison (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, const CallExpr *Call)
 
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, const CallExpr *Call)
 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_abs (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
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 noopPointer (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 Just takes the first Argument to the call and puts it on the stack.
 
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)
 
static bool interp__builtin_atomic_lock_free (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 bool __atomic_always_lock_free(size_t, void const volatile*) bool __atomic_is_lock_free(size_t, void const volatile*) bool __c11_atomic_is_lock_free(size_t)
 
static bool interp__builtin_complex (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 __builtin_complex(Float A, float B);
 
static bool interp__builtin_is_aligned_up_down (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 __builtin_is_aligned() __builtin_align_up() __builtin_align_down() The first parameter is either an integer or a pointer.
 
static bool interp__builtin_assume_aligned (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 __builtin_assume_aligned(Ptr, Alignment[, ExtraOffset])
 
static bool interp__builtin_ia32_bextr (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_ia32_bzhi (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_ia32_lzcnt (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_ia32_tzcnt (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_ia32_pdep (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_ia32_pext (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_ia32_addcarry_subborrow (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_os_log_format_buffer_size (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_ptrauth_string_discriminator (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_constant_p (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_operator_new (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_operator_delete (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_arithmetic_fence (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_vector_reduce (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool interp__builtin_elementwise_popcount (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 Can be called with an integer or vector as the first and only parameter.
 
static bool interp__builtin_memcpy (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool isOneByteCharacterType (QualType T)
 Determine if T is a character type for which we guarantee that sizeof(T) == 1.
 
static bool interp__builtin_memcmp (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call)
 
static bool copyComposite (InterpState &S, CodePtr OpPC, const Pointer &Src, Pointer &Dest, bool Activate)
 
static bool copyRecord (InterpState &S, CodePtr OpPC, const Pointer &Src, Pointer &Dest, bool Activate=false)
 
static void swapBytes (std::byte *M, size_t N)
 
bool DoBitCast (InterpState &S, CodePtr OpPC, const Pointer &Ptr, std::byte *Buff, Bits BitWidth, Bits FullBitWidth, bool &HasIndeterminateBits)
 
bool DoBitCastPtr (InterpState &S, CodePtr OpPC, const Pointer &FromPtr, Pointer &ToPtr)
 
bool DoBitCastPtr (InterpState &S, CodePtr OpPC, const Pointer &FromPtr, Pointer &ToPtr, size_t Size)
 
bool readPointerToBuffer (const Context &Ctx, const Pointer &FromPtr, BitcastBuffer &Buffer, bool ReturnOnUninit)
 
bool DoMemcpy (InterpState &S, CodePtr OpPC, const Pointer &SrcPtr, const Pointer &DestPtr, Bits Size)
 
llvm::BitVector collectNonNullArgs (const FunctionDecl *F, const llvm::ArrayRef< const Expr * > &Args)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, MemberPointer FP)
 
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.
 
constexpr bool isPtrType (PrimType T)
 
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 19 of file FixedPoint.h.

◆ APSInt

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

Definition at line 20 of file FixedPoint.h.

◆ BlockCtorFn

using clang::interp::BlockCtorFn = typedef void (*)(Block *Storage, std::byte *FieldPtr, bool IsConst, bool IsMutable, bool IsActive, bool InUnion, 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 35 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 41 of file Descriptor.h.

◆ BlockMoveFn

using clang::interp::BlockMoveFn = typedef void (*)(Block *Storage, 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 48 of file Descriptor.h.

◆ CompareFn

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

Definition at line 940 of file Interp.h.

◆ DeclTy

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

Definition at line 29 of file Descriptor.h.

◆ FixedPointSemantics

using clang::interp::FixedPointSemantics = typedef llvm::FixedPointSemantics

Definition at line 43 of file Interp.h.

◆ FunctionDeclTy

using clang::interp::FunctionDeclTy = typedef llvm::PointerUnion<const FunctionDecl *, const BlockExpr *>

Definition at line 59 of file Function.h.

◆ InitMapPtr

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

Definition at line 30 of file Descriptor.h.

◆ SourceMap

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

Definition at line 100 of file Source.h.

Enumeration Type Documentation

◆ ArithOp

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

Definition at line 308 of file Interp.h.

◆ CastKind

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

Definition at line 57 of file PrimType.h.

◆ Endian

enum class clang::interp::Endian
strong
Enumerator
Little 
Big 

Definition at line 19 of file BitcastBuffer.h.

◆ GlobalInitState

enum class clang::interp::GlobalInitState
strong
Enumerator
Initialized 
NoInitializer 
InitializerFailed 

Definition at line 52 of file Descriptor.h.

◆ IncDecOp

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

Definition at line 761 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_FixedPoint 
PT_Float 
PT_Ptr 
PT_FnPtr 
PT_MemberPtr 

Definition at line 34 of file PrimType.h.

◆ PushVal

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

Definition at line 757 of file Interp.h.

◆ ShiftDir

enum class clang::interp::ShiftDir
strong
Enumerator
Left 
Right 

Definition at line 172 of file Interp.h.

◆ Storage

enum class clang::interp::Storage
strong
Enumerator
Block 
Int 
Fn 

Definition at line 52 of file Pointer.h.

Function Documentation

◆ Add()

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

Definition at line 402 of file Interp.h.

References clang::T.

◆ Addf()

bool clang::interp::Addf ( InterpState S,
CodePtr  OpPC,
uint32_t  FPOI 
)
inline

◆ AddOffset()

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

Definition at line 2052 of file Interp.h.

References clang::interp::Pointer::expand(), and clang::T.

◆ 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 138 of file PrimType.h.

References aligned(), and P.

◆ aligned() [2/2]

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

◆ Alloc()

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

◆ AllocCN()

template<PrimType Name, class SizeT = typename PrimConv<Name>::T>
bool clang::interp::AllocCN ( InterpState S,
CodePtr  OpPC,
const Descriptor ElementDesc,
bool  IsNoThrow 
)
inline

◆ AllocN()

template<PrimType Name, class SizeT = typename PrimConv<Name>::T>
bool clang::interp::AllocN ( InterpState S,
CodePtr  OpPC,
PrimType  T,
const Expr Source,
bool  IsNoThrow 
)
inline

◆ ArrayDecay()

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

◆ ArrayElem()

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

◆ 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 2646 of file Interp.h.

References CheckArray(), NarrowPtr(), and clang::T.

◆ ArrayElemPtrPop()

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

Definition at line 2662 of file Interp.h.

References CheckArray(), NarrowPtr(), and clang::T.

◆ assignInteger()

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

◆ Assume()

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

Definition at line 2840 of file Interp.h.

References Loc.

◆ 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 603 of file Interp.h.

References clang::Result, and clang::T.

◆ BitCast()

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

Definition at line 3077 of file Interp.h.

References CheckLoad(), and DoBitCastPtr().

◆ BitCastPrim()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::BitCastPrim ( InterpState S,
CodePtr  OpPC,
bool  TargetIsUCharOrByte,
uint32_t  ResultBitWidth,
const llvm::fltSemantics *  Sem 
)
inline

Definition at line 3033 of file Interp.h.

References CheckBitCast(), CheckLoad(), DoBitCast(), and clang::T.

◆ 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 620 of file Interp.h.

References clang::Result, and clang::T.

◆ 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 637 of file Interp.h.

References clang::Result, and clang::T.

◆ Call()

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

◆ callArgSize()

static unsigned clang::interp::callArgSize ( const InterpState S,
const CallExpr C 
)
static

◆ CallBI()

bool clang::interp::CallBI ( InterpState S,
CodePtr  OpPC,
const Function Func,
const CallExpr CE,
uint32_t  BuiltinID 
)

Definition at line 1361 of file Interp.cpp.

References clang::Func, and InterpretBuiltin().

◆ CallPtr()

bool clang::interp::CallPtr ( InterpState S,
CodePtr  OpPC,
uint32_t  ArgSize,
const CallExpr CE 
)

◆ CallVar()

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

◆ CallVirt()

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

◆ Cast()

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

Definition at line 2181 of file Interp.h.

References clang::T.

◆ 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 2217 of file Interp.h.

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

◆ CastAPS()

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

Definition at line 2224 of file Interp.h.

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

◆ CastFixedPoint()

bool clang::interp::CastFixedPoint ( InterpState S,
CodePtr  OpPC,
uint32_t  FPS 
)
inline

Definition at line 2198 of file Interp.h.

References handleFixedPointOverflow(), and clang::Result.

◆ CastFixedPointFloating()

static bool clang::interp::CastFixedPointFloating ( InterpState S,
CodePtr  OpPC,
const llvm::fltSemantics *  Sem 
)
inlinestatic

Definition at line 2359 of file Interp.h.

◆ CastFixedPointIntegral()

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

Definition at line 2368 of file Interp.h.

References handleOverflow(), Int, and clang::T.

◆ CastFloatingFixedPoint()

static bool clang::interp::CastFloatingFixedPoint ( InterpState S,
CodePtr  OpPC,
uint32_t  FPS 
)
inlinestatic

◆ CastFloatingIntegral()

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

◆ CastFloatingIntegralAP()

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

◆ CastFloatingIntegralAPS()

static bool clang::interp::CastFloatingIntegralAPS ( InterpState S,
CodePtr  OpPC,
uint32_t  BitWidth,
uint32_t  FPOI 
)
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 2190 of file Interp.h.

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

◆ CastIntegralFixedPoint()

template<PrimType Name, class T = typename PrimConv<Name>::T>
static bool clang::interp::CastIntegralFixedPoint ( InterpState S,
CodePtr  OpPC,
uint32_t  FPS 
)
inlinestatic

◆ CastIntegralFloating()

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

◆ CastMemberPtrPtr()

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

Definition at line 1922 of file Interp.h.

◆ CastPointerIntegral()

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

◆ CastPointerIntegralAP()

bool clang::interp::CastPointerIntegralAP ( InterpState S,
CodePtr  OpPC,
uint32_t  BitWidth 
)

◆ CastPointerIntegralAPS()

bool clang::interp::CastPointerIntegralAPS ( InterpState S,
CodePtr  OpPC,
uint32_t  BitWidth 
)

◆ CheckAllocations()

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

Definition at line 3016 of file Interp.h.

◆ CheckArray()

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

Checks if the array is offsetable.

Definition at line 298 of file Interp.cpp.

References E, and clang::interp::Pointer::isUnknownSizeArray().

Referenced by ArrayElemPtr(), ArrayElemPtrPop(), GetPtrField(), GetPtrFieldPop(), interp__builtin_strlen(), and OffsetHelper().

◆ CheckArrayInitialized()

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

◆ CheckArraySize()

template<typename SizeT >
bool clang::interp::CheckArraySize ( InterpState S,
CodePtr  OpPC,
SizeT *  NumElements,
unsigned  ElemSize,
bool  IsNoThrow 
)

◆ CheckBitCast()

bool clang::interp::CheckBitCast ( InterpState S,
CodePtr  OpPC,
bool  HasIndeterminateBits,
bool  TargetIsUCharOrByte 
)

Definition at line 1581 of file Interp.cpp.

References E, clang::Sema::getLangOpts(), clang::Stmt::getSourceRange(), and clang::Expr::getType().

Referenced by BitCastPrim().

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

◆ 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

◆ checkConstructor()

static bool clang::interp::checkConstructor ( InterpState S,
CodePtr  OpPC,
const Function Func,
const Pointer ThisPtr 
)
static

Definition at line 1157 of file Interp.cpp.

References D, clang::Func, and clang::interp::Pointer::getFieldDesc().

Referenced by Call().

◆ CheckDecl()

bool clang::interp::CheckDecl ( InterpState S,
CodePtr  OpPC,
const VarDecl VD 
)
inline

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

References D, diagnoseUnknownDecl(), and clang::DeclRefExpr::getDecl().

Referenced by InvalidDeclRef().

◆ CheckDeleteSource()

bool clang::interp::CheckDeleteSource ( InterpState S,
CodePtr  OpPC,
const Expr Source,
const Pointer Ptr 
)

Check the source of the pointer passed to delete/delete[] has actually been heap allocated by us.

Definition at line 872 of file Interp.cpp.

References clang::Sema::getASTContext(), clang::CallExpr::getBuiltinCallee(), clang::interp::Pointer::getDeclLoc(), clang::interp::Pointer::isTemporary(), Loc, and clang::interp::Pointer::toDiagnosticString().

Referenced by Free().

◆ 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 222 of file Interp.h.

References E, clang::Expr::getType(), and Loc.

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

◆ CheckDowncast()

bool clang::interp::CheckDowncast ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr,
uint32_t  Offset 
)

◆ CheckDummy()

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

◆ CheckDynamicMemoryAllocation()

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

Checks if dynamic memory allocation is available in the current language mode.

Definition at line 835 of file Interp.cpp.

References E, and clang::Sema::getLangOpts().

Referenced by Alloc(), AllocCN(), AllocN(), and Free().

◆ CheckEnumValue()

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

Definition at line 2883 of file Interp.h.

References diagnoseEnumValue(), clang::EnumDecl::isFixed(), and clang::T.

◆ 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

◆ CheckFinalLoad()

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

This is not used by any of the opcodes directly.

It's used by EvalEmitter to do the final lvalue-to-rvalue conversion.

Definition at line 618 of file Interp.cpp.

References clang::AK_Read, CheckActive(), CheckConstant(), CheckDummy(), CheckExtern(), CheckInitialized(), CheckLive(), CheckMutable(), CheckRange(), CheckTemporary(), and CheckWeak().

◆ CheckFloatResult()

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

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

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

Referenced by Init(), 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 659 of file Interp.cpp.

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

Referenced by Call(), and CallVar().

◆ CheckLiteralType()

bool clang::interp::CheckLiteralType ( InterpState S,
CodePtr  OpPC,
const Type T 
)

Definition at line 1126 of file Interp.cpp.

References E, clang::Sema::getLangOpts(), clang::Expr::getType(), and clang::T.

◆ 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,
AccessKinds  AK 
)

◆ CheckMutable()

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

◆ CheckNewDeleteForms()

bool clang::interp::CheckNewDeleteForms ( InterpState S,
CodePtr  OpPC,
DynamicAllocator::Form  AllocForm,
DynamicAllocator::Form  DeleteForm,
const Descriptor D,
const Expr NewExpr 
)

Diagnose mismatched new[]/delete or new/delete[] pairs.

Definition at line 844 of file Interp.cpp.

References D, E, clang::Sema::getASTContext(), clang::ASTContext::getConstantArrayType(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), and clang::Normal.

Referenced by Free(), and interp__builtin_operator_delete().

◆ CheckNewTypeMismatch()

bool clang::interp::CheckNewTypeMismatch ( InterpState S,
CodePtr  OpPC,
const Expr E,
std::optional< uint64_t >  ArraySize 
)

◆ CheckNewTypeMismatchArray()

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

Definition at line 3026 of file Interp.h.

References CheckNewTypeMismatch(), E, and clang::T.

◆ CheckNonNullArg()

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

Definition at line 2868 of file Interp.h.

References Loc, and clang::T.

◆ CheckNonNullArgs()

bool clang::interp::CheckNonNullArgs ( InterpState S,
CodePtr  OpPC,
const Function F,
const CallExpr CE,
unsigned  ArgSize 
)

Checks if all the arguments annotated as 'nonnull' are in fact not null.

Definition at line 922 of file Interp.cpp.

References align(), collectNonNullArgs(), clang::CallExpr::getArgs(), clang::interp::Function::getDecl(), clang::CallExpr::getNumArgs(), clang::interp::Pointer::isZero(), Loc, primSize(), and PT_Ptr.

Referenced by CallPtr().

◆ CheckNull()

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

◆ CheckPointerToIntegralCast()

bool clang::interp::CheckPointerToIntegralCast ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr,
unsigned  BitWidth 
)

◆ CheckPure()

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

Checks if a method is pure virtual.

Definition at line 779 of file Interp.cpp.

References E, 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 425 of file Interp.cpp.

References clang::interp::Pointer::isElementPastEnd(), and Loc.

◆ CheckShift()

template<ShiftDir Dir, 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 176 of file Interp.h.

References E, clang::Sema::getLangOpts(), clang::Expr::getType(), Left, and Loc.

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

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

Referenced by CheckNewTypeMismatch(), 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 435 of file Interp.cpp.

References clang::interp::Pointer::isOnePastEnd(), and Loc.

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

◆ CheckThis()

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

◆ CheckVolatile()

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

◆ CheckWeak()

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

◆ cleanupAfterFunctionCall()

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

◆ 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 943 of file Interp.h.

References Fn, and clang::T.

◆ 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 961 of file Interp.h.

References clang::Sema::getASTContext(), Loc, and 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 955 of file Interp.h.

References Fn.

◆ CmpHelperEQ< FunctionPointer >()

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

◆ CmpHelperEQ< MemberPointer >()

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

◆ CmpHelperEQ< Pointer >()

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

◆ collectBlocks()

static void clang::interp::collectBlocks ( const Pointer Ptr,
llvm::SetVector< const Block * > &  Blocks 
)
static

◆ collectNonNullArgs()

llvm::BitVector clang::interp::collectNonNullArgs ( const FunctionDecl F,
const llvm::ArrayRef< const Expr * > &  Args 
)

◆ 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 925 of file Interp.h.

References clang::Result, and clang::T.

◆ 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 1243 of file Interp.h.

References clang::T.

◆ CopyArray()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::CopyArray ( InterpState S,
CodePtr  OpPC,
uint32_t  SrcIndex,
uint32_t  DestIndex,
uint32_t  Size 
)
inline

◆ copyComposite()

static bool clang::interp::copyComposite ( InterpState S,
CodePtr  OpPC,
const Pointer Src,
Pointer Dest,
bool  Activate = false 
)
static

◆ copyRecord()

static bool clang::interp::copyRecord ( InterpState S,
CodePtr  OpPC,
const Pointer Src,
Pointer Dest,
bool  Activate = false 
)
static

◆ 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 849 of file Interp.h.

References clang::AK_Decrement, and CheckLoad().

◆ DecayPtr()

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

OldPtr -> Integer -> NewPtr.

Definition at line 2895 of file Interp.h.

References isPtrType().

◆ Decf()

bool clang::interp::Decf ( InterpState S,
CodePtr  OpPC,
uint32_t  FPOI 
)
inline

Definition at line 906 of file Interp.h.

References clang::AK_Decrement, and CheckLoad().

◆ DecfPop()

bool clang::interp::DecfPop ( InterpState S,
CodePtr  OpPC,
uint32_t  FPOI 
)
inline

Definition at line 914 of file Interp.h.

References clang::AK_Decrement, and CheckLoad().

◆ 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 861 of file Interp.h.

References clang::AK_Decrement, and CheckLoad().

◆ DecPtr()

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

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

◆ diagnoseEnumValue()

void clang::interp::diagnoseEnumValue ( InterpState S,
CodePtr  OpPC,
const EnumDecl ED,
const APSInt Value 
)

◆ diagnoseNonConstexprBuiltin()

static void clang::interp::diagnoseNonConstexprBuiltin ( InterpState S,
CodePtr  OpPC,
unsigned  ID 
)
static

◆ DiagnoseUninitializedSubobject()

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

Definition at line 54 of file EvaluationResult.cpp.

References clang::Decl::getLocation(), and Loc.

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 674 of file Interp.h.

References CheckDivRem(), handleFixedPointOverflow(), clang::Result, and clang::T.

Referenced by clang::interp::Compiler< Emitter >::VisitVectorBinOp().

◆ Divc()

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

◆ Divf()

bool clang::interp::Divf ( InterpState S,
CodePtr  OpPC,
uint32_t  FPOI 
)
inline

◆ DoBitCast()

bool clang::interp::DoBitCast ( InterpState S,
CodePtr  OpPC,
const Pointer Ptr,
std::byte *  Buff,
Bits  BitWidth,
Bits  FullBitWidth,
bool HasIndeterminateBits 
)

◆ DoBitCastPtr() [1/2]

bool clang::interp::DoBitCastPtr ( InterpState S,
CodePtr  OpPC,
const Pointer FromPtr,
Pointer ToPtr 
)

◆ DoBitCastPtr() [2/2]

bool clang::interp::DoBitCastPtr ( InterpState S,
CodePtr  OpPC,
const Pointer FromPtr,
Pointer ToPtr,
size_t  Size 
)

◆ DoMemcpy() [1/2]

bool clang::interp::DoMemcpy ( InterpState S,
CodePtr  OpPC,
const Pointer Src,
Pointer Dest 
)

Copy the contents of Src into Dest.

Definition at line 2694 of file InterpBuiltin.cpp.

References copyComposite(), and DoMemcpy().

Referenced by DoMemcpy(), interp__builtin_memcpy(), and Memcpy().

◆ DoMemcpy() [2/2]

bool clang::interp::DoMemcpy ( InterpState S,
CodePtr  OpPC,
const Pointer SrcPtr,
const Pointer DestPtr,
Bits  Size 
)

◆ DoShift()

template<class LT , class RT , ShiftDir Dir>
bool clang::interp::DoShift ( InterpState S,
CodePtr  OpPC,
LT LHS,
RT &  RHS 
)
inline

Definition at line 2481 of file Interp.h.

References Compare(), DoShift(), clang::Sema::getLangOpts(), clang::Greater, Left, Loc, LT, and Right.

Referenced by DoShift().

◆ Dump()

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

Definition at line 1707 of file Interp.h.

◆ Dup()

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

Definition at line 1212 of file Interp.h.

References clang::T.

◆ EQ()

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

Definition at line 1126 of file Interp.h.

References clang::Equal.

◆ Error()

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

Do nothing and just abort execution.

Definition at line 2797 of file Interp.h.

◆ ExpandPtr()

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

Definition at line 2631 of file Interp.h.

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

◆ FinishInit()

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

◆ FinishInitPop()

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

◆ Flip()

template<PrimType TopName, PrimType BottomName>
bool clang::interp::Flip ( InterpState S,
CodePtr  OpPC 
)

[Value1, Value2] -> [Value2, Value1]

Definition at line 1225 of file Interp.h.

◆ Free()

bool clang::interp::Free ( InterpState S,
CodePtr  OpPC,
bool  DeleteIsArrayForm,
bool  IsGlobalDelete 
)

◆ GE()

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

Definition at line 1186 of file Interp.h.

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

◆ getAPSIntParam()

static APSInt clang::interp::getAPSIntParam ( const InterpFrame Frame,
unsigned  Index 
)
static

Definition at line 42 of file InterpBuiltin.cpp.

References INT_TYPE_SWITCH, and clang::T.

Referenced by interp__builtin_ia32_addcarry_subborrow().

◆ 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 1288 of file Interp.h.

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

◆ 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 1320 of file Interp.h.

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

◆ GetFnPtr()

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

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

References clang::interp::Pointer::deref(), clang::interp::Pointer::isInitialized(), and clang::T.

◆ getIntPrimType()

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

◆ GetIntPtr()

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

Definition at line 2751 of file Interp.h.

References clang::T.

◆ GetLocal()

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

Definition at line 1253 of file Interp.h.

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

◆ getLongPrimType()

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

◆ GetMemberPtr()

bool clang::interp::GetMemberPtr ( InterpState S,
CodePtr  OpPC,
const ValueDecl D 
)
inline

Definition at line 2758 of file Interp.h.

References D.

◆ GetMemberPtrBase()

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

Definition at line 2763 of file Interp.h.

◆ GetMemberPtrBasePop()

bool clang::interp::GetMemberPtrBasePop ( InterpState S,
CodePtr  OpPC,
int32_t  Off 
)
inline

Definition at line 1673 of file Interp.h.

◆ GetMemberPtrDecl()

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

Definition at line 2770 of file Interp.h.

References clang::Func.

◆ getParam()

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

Definition at line 36 of file InterpBuiltin.cpp.

References clang::T.

◆ GetParam()

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

Definition at line 1271 of file Interp.h.

References clang::T.

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

◆ GetPtrFieldPop()

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

◆ GetPtrGlobal()

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

Definition at line 1522 of file Interp.h.

◆ GetPtrLocal()

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

Definition at line 1509 of file Interp.h.

◆ GetPtrParam()

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

Definition at line 1514 of file Interp.h.

◆ GetPtrThisBase()

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

Definition at line 1679 of file Interp.h.

References CheckThis(), and This().

◆ GetPtrThisField()

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

Definition at line 1585 of file Interp.h.

References CheckThis(), and This().

◆ GetPtrThisVirtBase()

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

Definition at line 1732 of file Interp.h.

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

◆ GetPtrVirtBasePop()

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

Definition at line 1723 of file Interp.h.

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

◆ getRoundingMode()

static llvm::RoundingMode clang::interp::getRoundingMode ( FPOptions  FPO)
inlinestatic

◆ getSwappedBytes() [1/3]

FixedPoint clang::interp::getSwappedBytes ( FixedPoint  F)
inline

Definition at line 162 of file FixedPoint.h.

◆ getSwappedBytes() [2/3]

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

Definition at line 19 of file Floating.cpp.

◆ getSwappedBytes() [3/3]

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

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

References CheckLoad(), CheckThis(), clang::T, and This().

◆ GT()

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

Definition at line 1179 of file Interp.h.

References clang::Greater.

◆ handleFixedPointOverflow()

bool clang::interp::handleFixedPointOverflow ( InterpState S,
CodePtr  OpPC,
const FixedPoint FP 
)

◆ handleOverflow()

template<typename T >
static bool clang::interp::handleOverflow ( InterpState S,
CodePtr  OpPC,
const T SrcValue 
)
static

◆ hasVirtualDestructor()

static bool clang::interp::hasVirtualDestructor ( QualType  T)
static

Definition at line 1001 of file Interp.cpp.

References clang::Type::getAsCXXRecordDecl(), and clang::T.

Referenced by Free().

◆ 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 824 of file Interp.h.

References clang::AK_Increment, and CheckLoad().

◆ IncDecFloatHelper()

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

◆ 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,
uint32_t  FPOI 
)
inline

Definition at line 890 of file Interp.h.

References clang::AK_Increment, and CheckLoad().

◆ IncfPop()

bool clang::interp::IncfPop ( InterpState S,
CodePtr  OpPC,
uint32_t  FPOI 
)
inline

Definition at line 898 of file Interp.h.

References clang::AK_Increment, and CheckLoad().

◆ 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 836 of file Interp.h.

References clang::AK_Increment, and CheckLoad().

◆ IncPtr()

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

Definition at line 2094 of file Interp.h.

References clang::AK_Increment, and CheckInitialized().

◆ Init()

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

Definition at line 1828 of file Interp.h.

References CheckInit(), and clang::T.

◆ 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 1494 of file Interp.h.

References clang::Sema::getASTContext(), and clang::T.

◆ 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 1857 of file Interp.h.

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

◆ 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 1882 of file Interp.h.

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

◆ 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 1484 of file Interp.h.

References clang::T.

◆ InitGlobal()

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

Definition at line 1396 of file Interp.h.

References P, and clang::T.

◆ 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) Initializes global with index \I with that

Definition at line 1407 of file Interp.h.

References clang::interp::Descriptor::asExpr(), clang::interp::Pointer::deref(), clang::Sema::getASTContext(), clang::interp::Pointer::getDeclDesc(), clang::LifetimeExtendedTemporaryDecl::getOrCreateValue(), clang::interp::Pointer::initialize(), and clang::T.

◆ 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 1429 of file Interp.h.

References clang::Sema::getASTContext(), clang::LifetimeExtendedTemporaryDecl::getOrCreateValue(), clang::LifetimeExtendedTemporaryDecl::getTemporaryExpr(), clang::Expr::getType(), and P.

◆ InitPop()

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

Definition at line 1842 of file Interp.h.

References clang::interp::Pointer::activate(), CheckInit(), and clang::T.

◆ InitScope()

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

Definition at line 2172 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,
uint32_t  FieldOffset 
)

Definition at line 1464 of file Interp.h.

References CheckThis(), clang::Sema::getASTContext(), clang::T, and This().

◆ InitThisField()

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

Definition at line 1448 of file Interp.h.

References CheckThis(), clang::T, and This().

◆ InRange()

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

Definition at line 1198 of file Interp.h.

References clang::T.

◆ interp__builtin_abs()

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

Definition at line 624 of file InterpBuiltin.cpp.

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

Referenced by InterpretBuiltin().

◆ 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 746 of file InterpBuiltin.cpp.

References clang::Call, PT_FnPtr, and PT_Ptr.

Referenced by InterpretBuiltin().

◆ interp__builtin_arithmetic_fence()

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

Definition at line 1735 of file InterpBuiltin.cpp.

Referenced by InterpretBuiltin().

◆ interp__builtin_assume_aligned()

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

◆ interp__builtin_atomic_lock_free()

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

◆ 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 666 of file InterpBuiltin.cpp.

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

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 1021 of file InterpBuiltin.cpp.

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

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 905 of file InterpBuiltin.cpp.

References align(), assignInteger(), clang::Call, clang::Func, clang::interp::Pointer::initialize(), peekToAPSInt(), primSize(), PT_Ptr, pushInteger(), 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 657 of file InterpBuiltin.cpp.

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

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 966 of file InterpBuiltin.cpp.

References clang::Call, callArgSize(), clang::Func, peekToAPSInt(), and pushInteger().

Referenced by InterpretBuiltin().

◆ interp__builtin_complex()

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

__builtin_complex(Float A, float B);

Definition at line 1116 of file InterpBuiltin.cpp.

References align(), primSize(), PT_Float, PT_Ptr, and clang::Result.

Referenced by InterpretBuiltin().

◆ interp__builtin_constant_p()

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

◆ interp__builtin_copysign()

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

Definition at line 380 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 998 of file InterpBuiltin.cpp.

References clang::Call, callArgSize(), clang::Func, peekToAPSInt(), and pushInteger().

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

◆ interp__builtin_elementwise_popcount()

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

◆ 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 615 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 735 of file InterpBuiltin.cpp.

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

Referenced by InterpretBuiltin().

◆ interp__builtin_fmax()

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

◆ interp__builtin_fmin()

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

◆ interp__builtin_fpclassify()

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

Five int values followed by one floating value.

Definition at line 577 of file InterpBuiltin.cpp.

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

Referenced by InterpretBuiltin().

◆ interp__builtin_ia32_addcarry_subborrow()

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

◆ interp__builtin_ia32_bextr()

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

Definition at line 1310 of file InterpBuiltin.cpp.

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

Referenced by InterpretBuiltin().

◆ interp__builtin_ia32_bzhi()

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

◆ interp__builtin_ia32_lzcnt()

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

Definition at line 1368 of file InterpBuiltin.cpp.

References clang::Call, clang::Type::isIntegerType(), peekToAPSInt(), and pushInteger().

Referenced by InterpretBuiltin().

◆ interp__builtin_ia32_pdep()

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

Definition at line 1396 of file InterpBuiltin.cpp.

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

Referenced by InterpretBuiltin().

◆ interp__builtin_ia32_pext()

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

Definition at line 1421 of file InterpBuiltin.cpp.

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

Referenced by InterpretBuiltin().

◆ interp__builtin_ia32_tzcnt()

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

Definition at line 1382 of file InterpBuiltin.cpp.

References clang::Call, clang::Type::isIntegerType(), peekToAPSInt(), and pushInteger().

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_is_aligned_up_down()

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

◆ interp__builtin_is_constant_evaluated()

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

◆ interp__builtin_isfinite()

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

Definition at line 476 of file InterpBuiltin.cpp.

References clang::Call, clang::interp::Floating::isFinite(), and pushInteger().

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 560 of file InterpBuiltin.cpp.

References align(), clang::Call, clang::interp::Floating::classify(), peekToAPSInt(), primSize(), PT_Float, pushInteger(), 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,
const CallExpr Call 
)
static

◆ interp__builtin_isnan()

static bool clang::interp::interp__builtin_isnan ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function F,
const CallExpr Call 
)
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 444 of file InterpBuiltin.cpp.

References clang::Call, clang::interp::Floating::isNan(), and pushInteger().

Referenced by InterpretBuiltin().

◆ interp__builtin_isnormal()

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

Definition at line 485 of file InterpBuiltin.cpp.

References clang::Call, clang::interp::Floating::isNormal(), and pushInteger().

Referenced by InterpretBuiltin().

◆ interp__builtin_issignaling()

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

Definition at line 453 of file InterpBuiltin.cpp.

References clang::Call, clang::interp::Floating::isSignaling(), and pushInteger().

Referenced by InterpretBuiltin().

◆ interp__builtin_issubnormal()

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

Definition at line 494 of file InterpBuiltin.cpp.

References clang::Call, clang::interp::Floating::isDenormal(), and pushInteger().

Referenced by InterpretBuiltin().

◆ interp__builtin_iszero()

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

Definition at line 504 of file InterpBuiltin.cpp.

References clang::Call, clang::interp::Floating::isZero(), and pushInteger().

Referenced by InterpretBuiltin().

◆ interp__builtin_memcmp()

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

◆ interp__builtin_memcpy()

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

◆ 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 765 of file InterpBuiltin.cpp.

References clang::Call, clang::Func, PT_Ptr, clang::T, 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_operator_delete()

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

◆ interp__builtin_operator_new()

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

◆ interp__builtin_os_log_format_buffer_size()

static bool clang::interp::interp__builtin_os_log_format_buffer_size ( InterpState S,
CodePtr  OpPC,
const InterpFrame Frame,
const Function Func,
const CallExpr Call 
)
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 648 of file InterpBuiltin.cpp.

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

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 638 of file InterpBuiltin.cpp.

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

Referenced by InterpretBuiltin().

◆ interp__builtin_ptrauth_string_discriminator()

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

Definition at line 1495 of file InterpBuiltin.cpp.

References clang::Call, pushInteger(), and clang::Result.

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 712 of file InterpBuiltin.cpp.

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

Referenced by InterpretBuiltin().

◆ interp__builtin_signbit()

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

Definition at line 513 of file InterpBuiltin.cpp.

References clang::Call, clang::interp::Floating::isNegative(), and pushInteger().

Referenced by InterpretBuiltin().

◆ interp__builtin_strcmp()

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

◆ interp__builtin_strlen()

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

◆ interp__builtin_vector_reduce()

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

◆ interp_floating_comparison()

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

◆ Interpret()

bool clang::interp::Interpret ( InterpState S)

Interpreter entry point.

Definition at line 1602 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,
uint32_t  BuiltinID 
)

Interpret a builtin function.

Definition at line 2030 of file InterpBuiltin.cpp.

References clang::Call, interp__builtin_abs(), interp__builtin_addressof(), interp__builtin_arithmetic_fence(), interp__builtin_assume_aligned(), interp__builtin_atomic_lock_free(), interp__builtin_bitreverse(), interp__builtin_bswap(), interp__builtin_carryop(), interp__builtin_classify_type(), interp__builtin_clrsb(), interp__builtin_clz(), interp__builtin_complex(), interp__builtin_constant_p(), interp__builtin_copysign(), interp__builtin_ctz(), interp__builtin_eh_return_data_regno(), interp__builtin_elementwise_popcount(), interp__builtin_expect(), interp__builtin_fabs(), interp__builtin_ffs(), interp__builtin_fmax(), interp__builtin_fmin(), interp__builtin_fpclassify(), interp__builtin_ia32_addcarry_subborrow(), interp__builtin_ia32_bextr(), interp__builtin_ia32_bzhi(), interp__builtin_ia32_lzcnt(), interp__builtin_ia32_pdep(), interp__builtin_ia32_pext(), interp__builtin_ia32_tzcnt(), interp__builtin_inf(), interp__builtin_is_aligned_up_down(), interp__builtin_is_constant_evaluated(), interp__builtin_isfinite(), interp__builtin_isfpclass(), interp__builtin_isinf(), interp__builtin_isnan(), interp__builtin_isnormal(), interp__builtin_issignaling(), interp__builtin_issubnormal(), interp__builtin_iszero(), interp__builtin_memcmp(), interp__builtin_memcpy(), interp__builtin_move(), interp__builtin_nan(), interp__builtin_operator_delete(), interp__builtin_operator_new(), interp__builtin_os_log_format_buffer_size(), interp__builtin_overflowop(), interp__builtin_parity(), interp__builtin_popcount(), interp__builtin_ptrauth_string_discriminator(), interp__builtin_rotate(), interp__builtin_signbit(), interp__builtin_strcmp(), interp__builtin_strlen(), interp__builtin_vector_reduce(), interp_floating_comparison(), InterpretBuiltin(), noopPointer(), pushInteger(), and retPrimValue().

Referenced by CallBI(), and InterpretBuiltin().

◆ InterpretOffsetOf()

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

◆ Inv()

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

Definition at line 715 of file Interp.h.

◆ 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 2782 of file Interp.h.

References Loc.

◆ InvalidCast()

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

Same here, but only for casts.

Definition at line 2803 of file Interp.h.

References Loc, and Reinterpret.

◆ InvalidDeclRef()

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

Definition at line 2816 of file Interp.h.

References CheckDeclRef(), clang::DeclRefExpr::getDecl(), InitializerFailed, and Loc.

◆ InvalidNewDeleteExpr()

bool clang::interp::InvalidNewDeleteExpr ( InterpState S,
CodePtr  OpPC,
const Expr E 
)

Definition at line 1483 of file Interp.cpp.

References E, clang::Sema::getLangOpts(), clang::Stmt::getSourceRange(), and Loc.

Referenced by CheckNewTypeMismatch().

◆ InvalidShuffleVectorIndex()

bool clang::interp::InvalidShuffleVectorIndex ( InterpState S,
CodePtr  OpPC,
uint32_t  Index 
)

Definition at line 1533 of file Interp.cpp.

References Loc.

◆ IsConstantContext()

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

Definition at line 3011 of file Interp.h.

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

◆ isIntegralType()

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

◆ IsNonNull()

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

Definition at line 2433 of file Interp.h.

References clang::interp::Boolean::from(), P, and clang::T.

◆ isOneByteCharacterType()

static bool clang::interp::isOneByteCharacterType ( QualType  T)
static

Determine if T is a character type for which we guarantee that sizeof(T) == 1.

Definition at line 1918 of file InterpBuiltin.cpp.

References clang::Type::isChar8Type(), clang::Type::isCharType(), and clang::T.

Referenced by interp__builtin_memcmp().

◆ isPtrType()

constexpr bool clang::interp::isPtrType ( PrimType  T)
inlineconstexpr

◆ LE()

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

Definition at line 1171 of file Interp.h.

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

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

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

◆ LT()

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

Definition at line 1164 of file Interp.h.

References clang::Less.

◆ Memcpy()

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

Definition at line 1904 of file Interp.h.

References CheckLoad(), and DoMemcpy().

◆ Mul()

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

Definition at line 447 of file Interp.h.

References clang::T.

Referenced by clang::interp::Compiler< Emitter >::VisitVectorBinOp().

◆ Mulc()

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

◆ Mulf()

bool clang::interp::Mulf ( InterpState S,
CodePtr  OpPC,
uint32_t  FPOI 
)
inline

◆ NarrowPtr()

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

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

◆ noopPointer()

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

Just takes the first Argument to the call and puts it on the stack.

Definition at line 790 of file InterpBuiltin.cpp.

Referenced by InterpretBuiltin().

◆ NoRet()

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

Definition at line 2615 of file Interp.h.

◆ Null()

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

Definition at line 2424 of file Interp.h.

References clang::T.

◆ OffsetHelper()

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

◆ OffsetOf()

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

Definition at line 2853 of file Interp.h.

References E, InterpretOffsetOf(), clang::Result, and clang::T.

◆ operator<<() [1/9]

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

Definition at line 160 of file Boolean.h.

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

◆ operator<<() [2/9]

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

Definition at line 753 of file Pointer.h.

References P.

◆ operator<<() [3/9]

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

Definition at line 164 of file FixedPoint.h.

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

◆ operator<<() [4/9]

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<<() [5/9]

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

Definition at line 67 of file FunctionPointer.h.

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

◆ operator<<() [6/9]

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

Definition at line 333 of file Integral.h.

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

◆ operator<<() [7/9]

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

Definition at line 330 of file IntegralAP.h.

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

◆ operator<<() [8/9]

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

Definition at line 61 of file PrimType.h.

References Atomic, and Reinterpret.

◆ operator<<() [9/9]

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

Definition at line 109 of file MemberPointer.h.

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

◆ 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 1218 of file Interp.h.

References clang::T.

◆ popArg()

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

Definition at line 225 of file Interp.cpp.

References PT_Ptr, clang::T, and TYPE_SWITCH.

Referenced by cleanupAfterFunctionCall().

◆ primSize()

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

◆ PtrPtrCast()

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

Definition at line 2381 of file Interp.h.

References E, clang::Sema::getLangOpts(), and clang::interp::Pointer::isZero().

◆ pushInteger() [1/2]

static void clang::interp::pushInteger ( InterpState S,
const APSInt Val,
QualType  QT 
)
static

Pushes Val on the stack as the type given by QT.

Definition at line 86 of file InterpBuiltin.cpp.

References clang::Sema::getASTContext(), clang::ASTContext::getTypeSize(), INT_TYPE_SWITCH, clang::Type::isSignedIntegerOrEnumerationType(), clang::Type::isUnsignedIntegerOrEnumerationType(), clang::T, and V.

Referenced by interp__builtin_abs(), interp__builtin_bitreverse(), interp__builtin_carryop(), interp__builtin_classify_type(), interp__builtin_clrsb(), interp__builtin_clz(), interp__builtin_constant_p(), interp__builtin_ctz(), interp__builtin_eh_return_data_regno(), interp__builtin_elementwise_popcount(), interp__builtin_expect(), interp__builtin_ffs(), interp__builtin_fpclassify(), interp__builtin_ia32_addcarry_subborrow(), interp__builtin_ia32_bextr(), interp__builtin_ia32_bzhi(), interp__builtin_ia32_lzcnt(), interp__builtin_ia32_pdep(), interp__builtin_ia32_pext(), interp__builtin_ia32_tzcnt(), interp__builtin_is_aligned_up_down(), interp__builtin_isfinite(), interp__builtin_isfpclass(), interp__builtin_isinf(), interp__builtin_isnan(), interp__builtin_isnormal(), interp__builtin_issignaling(), interp__builtin_issubnormal(), interp__builtin_iszero(), interp__builtin_memcmp(), interp__builtin_os_log_format_buffer_size(), interp__builtin_parity(), interp__builtin_popcount(), interp__builtin_ptrauth_string_discriminator(), interp__builtin_rotate(), interp__builtin_signbit(), interp__builtin_strcmp(), interp__builtin_strlen(), interp__builtin_vector_reduce(), interp_floating_comparison(), InterpretBuiltin(), and pushInteger().

◆ pushInteger() [2/2]

template<typename T >
static void clang::interp::pushInteger ( InterpState S,
T  Val,
QualType  QT 
)
static

Definition at line 104 of file InterpBuiltin.cpp.

References pushInteger(), and clang::T.

◆ ReadArg()

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

Definition at line 3094 of file Interp.h.

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

◆ 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 3103 of file Interp.h.

◆ ReadArg< IntegralAP< true > >()

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

Definition at line 3103 of file Interp.h.

◆ readPointerToBuffer()

bool clang::interp::readPointerToBuffer ( const Context Ctx,
const Pointer FromPtr,
BitcastBuffer Buffer,
bool  ReturnOnUninit 
)

◆ 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 654 of file Interp.h.

References CheckDivRem(), clang::Result, and clang::T.

◆ Ret()

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

Definition at line 318 of file Interp.h.

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

Referenced by clang::interp::Record::getName(), and Ret().

◆ retPrimValue()

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

◆ RetVoid()

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

Definition at line 340 of file Interp.h.

References cleanupAfterFunctionCall().

Referenced by retPrimValue().

◆ RunDestructors()

static bool clang::interp::RunDestructors ( InterpState S,
CodePtr  OpPC,
const Block B 
)
static

◆ runRecordDestructor()

static bool clang::interp::runRecordDestructor ( InterpState S,
CodePtr  OpPC,
const Pointer BasePtr,
const Descriptor Desc 
)
static

◆ RVOPtr()

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

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

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

◆ SetGlobal()

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

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

References clang::T.

◆ SetParam()

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

Definition at line 1280 of file Interp.h.

References clang::T.

◆ SetThisField()

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

Definition at line 1348 of file Interp.h.

References CheckStore(), CheckThis(), clang::T, and This().

◆ SetThreeWayComparisonField()

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

◆ ShiftFixedPoint()

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

◆ Shl()

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

Definition at line 2566 of file Interp.h.

References LT.

◆ Shr()

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

Definition at line 2556 of file Interp.h.

References LT.

◆ SideEffect()

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

Definition at line 2798 of file Interp.h.

◆ SizelessVectorElementSize()

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

Definition at line 2831 of file Interp.h.

References E.

◆ Store()

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

Definition at line 1770 of file Interp.h.

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

◆ StoreBitField()

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

◆ StoreBitFieldPop()

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

◆ StorePop()

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

Definition at line 1784 of file Interp.h.

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

◆ Sub()

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

Definition at line 428 of file Interp.h.

References clang::T.

◆ Subf()

bool clang::interp::Subf ( InterpState S,
CodePtr  OpPC,
uint32_t  FPOI 
)
inline

◆ SubOffset()

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

Definition at line 2062 of file Interp.h.

References clang::T.

◆ SubPtr()

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

◆ swapBytes()

static void clang::interp::swapBytes ( std::byte *  M,
size_t  N 
)
inlinestatic

◆ This()

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

◆ ToMemberPtr()

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

Definition at line 1914 of file Interp.h.

References clang::Member.

◆ Unsupported()

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

Definition at line 2789 of file Interp.h.

References Loc.

◆ VirtBaseHelper()

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

Definition at line 1712 of file Interp.h.

Referenced by GetPtrThisVirtBase(), and GetPtrVirtBasePop().

◆ Zero()

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

Definition at line 2408 of file Interp.h.

References clang::T, and Zero().

Referenced by Divc(), and Zero().

◆ ZeroIntAP()

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

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

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