clang 22.0.0git
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  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
 If a Floating is constructed from Memory, it DOES NOT OWN THAT MEMORY. More...
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...
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
 If an IntegralAP is constructed from Memory, it DOES NOT OWN THAT MEMORY. More...
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
class  LocalScope
 Generic scope for local variables. More...
class  LocOverrideScope
 When generating code for e.g. More...
class  LoopScope
 Sets the context for break/continue statements. More...
class  MemberPointer
class  OptionScope
 Scope used to handle initialization methods. More...
class  OptPrimType
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_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...
struct  StdAllocatorCaller
class  StmtExprScope
class  SwitchScope
struct  TypeidPointer
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
 Invoked whenever a block is created.
using BlockDtorFn
 Invoked when a block is destroyed.
using APInt = llvm::APInt
using APSInt = llvm::APSInt
using APFloat = llvm::APFloat
using FunctionDeclTy
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  ScopeKind { Call , Block }
enum class  GlobalInitState { Initialized , NoInitializer , InitializerFailed }
enum class  Lifetime : uint8_t { Started , Ended }
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 , Typeid }
enum  PrimType : uint8_t {
  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_MemberPtr = 14
}
 Enumeration of the primitive types of the VM. More...
enum class  CastKind : uint8_t { Reinterpret , Volatile , Dynamic }

Functions

llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, const Boolean &B)
static std::optional< boolgetBoolValue (const Expr *E)
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)
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 isConstexprUnknown (const Pointer &P)
bool CheckBCPResult (InterpState &S, const Pointer &Ptr)
bool CheckActive (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
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 DiagnoseUninitialized (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK)
bool DiagnoseUninitialized (InterpState &S, CodePtr OpPC, bool Extern, const Descriptor *Desc, AccessKinds AK)
static bool CheckLifetime (InterpState &S, CodePtr OpPC, Lifetime LT, AccessKinds AK)
static bool CheckWeak (InterpState &S, CodePtr OpPC, const Block *B)
bool CheckGlobalLoad (InterpState &S, CodePtr OpPC, const Block *B)
 Checks a direct load of a primitive value from a global or local variable.
bool CheckLocalLoad (InterpState &S, CodePtr OpPC, const Block *B)
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.
static bool CheckInvoke (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
bool CheckInit (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
 Checks if a value can be initialized.
static bool CheckCallable (InterpState &S, CodePtr OpPC, const Function *F)
static bool CheckCallDepth (InterpState &S, CodePtr OpPC)
bool CheckThis (InterpState &S, CodePtr OpPC, const Pointer &This)
 Checks the 'this' pointer.
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 Block *B, AccessKinds AK)
 Checks if a pointer is a dummy pointer.
static bool CheckNonNullArgs (InterpState &S, CodePtr OpPC, const Function *F, const CallExpr *CE, unsigned ArgSize)
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 getField (InterpState &S, CodePtr OpPC, const Pointer &Ptr, uint32_t Off)
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)
static bool checkConstructor (InterpState &S, CodePtr OpPC, const Function *Func, const Pointer &ThisPtr)
bool CheckDestructor (InterpState &S, CodePtr OpPC, const Pointer &Ptr)
static void compileFunction (InterpState &S, const Function *Func)
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 CallExpr *CE, uint32_t BuiltinID)
bool CallPtr (InterpState &S, CodePtr OpPC, uint32_t ArgSize, const CallExpr *CE)
static void startLifetimeRecurse (const Pointer &Ptr)
bool StartLifetime (InterpState &S, CodePtr OpPC)
static void endLifetimeRecurse (const Pointer &Ptr)
bool EndLifetime (InterpState &S, CodePtr OpPC)
 Ends the lifetime of the peek'd pointer.
bool EndLifetimePop (InterpState &S, CodePtr OpPC)
 Ends the lifetime of the pop'd pointer.
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 GetTypeid (InterpState &S, CodePtr OpPC, const Type *TypePtr, const Type *TypeInfoType)
 Typeid support.
bool GetTypeidPtr (InterpState &S, CodePtr OpPC, const Type *TypeInfoType)
bool DiagTypeid (InterpState &S, CodePtr OpPC)
bool arePotentiallyOverlappingStringLiterals (const Pointer &LHS, const Pointer &RHS)
static void copyPrimitiveMemory (InterpState &S, const Pointer &Ptr, PrimType T)
template<typename T>
static void copyPrimitiveMemory (InterpState &S, const Pointer &Ptr)
static void finishGlobalRecurse (InterpState &S, const Pointer &Ptr)
bool FinishInitGlobal (InterpState &S, CodePtr OpPC)
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)
bool CheckArraySize (InterpState &S, CodePtr OpPC, uint64_t NumElems)
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 CallExpr *Call, uint32_t BuiltinID)
 Interpret a builtin function.
bool InterpretOffsetOf (InterpState &S, CodePtr OpPC, const OffsetOfExpr *E, 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, bool CanOverflow)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Inc (InterpState &S, CodePtr OpPC, bool CanOverflow)
 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, bool CanOverflow)
 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 PreInc (InterpState &S, CodePtr OpPC, bool CanOverflow)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool Dec (InterpState &S, CodePtr OpPC, bool CanOverflow)
 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, bool CanOverflow)
 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<PrimType Name, class T = typename PrimConv<Name>::T>
bool PreDec (InterpState &S, CodePtr OpPC, bool CanOverflow)
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< Pointer > (InterpState &S, CodePtr OpPC, CompareFn Fn)
static bool IsOpaqueConstantCall (const CallExpr *E)
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 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)
bool ConstFloat (InterpState &S, CodePtr OpPC, const Floating &F)
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 InitThisFieldActivate (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 InitThisBitFieldActivate (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 InitFieldActivate (InterpState &S, CodePtr OpPC, uint32_t I)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool InitBitField (InterpState &S, CodePtr OpPC, const Record::Field *F)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool InitBitFieldActivate (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 GetPtrThisField (InterpState &S, CodePtr OpPC, uint32_t Off)
bool GetPtrDerivedPop (InterpState &S, CodePtr OpPC, uint32_t Off, bool NullOK, const Type *TargetType)
bool GetPtrBase (InterpState &S, CodePtr OpPC, uint32_t Off)
bool GetPtrBasePop (InterpState &S, CodePtr OpPC, uint32_t Off, bool NullOK)
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 FinishInitActivate (InterpState &S, CodePtr OpPC)
bool FinishInitActivatePop (InterpState &S, CodePtr OpPC)
bool Dump (InterpState &S, CodePtr OpPC)
bool CheckNull (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)
static bool Activate (InterpState &S, CodePtr OpPC)
static bool ActivateThisField (InterpState &S, CodePtr OpPC, uint32_t I)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool StoreActivate (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool StoreActivatePop (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 StoreBitFieldActivate (InterpState &S, CodePtr OpPC)
template<PrimType Name, class T = typename PrimConv<Name>::T>
bool StoreBitFieldActivatePop (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>
std::optional< PointerOffsetHelper (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 FnPtrCast (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, LT *Result)
template<class LT, class RT, ShiftDir Dir>
bool DoShiftAP (InterpState &S, CodePtr OpPC, const APSInt &LHS, APSInt RHS, LT *Result)
 A version of DoShift that works on IntegralAP.
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 StartSpeculation (InterpState &S, CodePtr OpPC)
bool EndSpeculation (InterpState &S, CodePtr OpPC)
bool PushCC (InterpState &S, CodePtr OpPC, bool Value)
bool PopCC (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 CheckPseudoDtor (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, const Type *TargetType)
bool BitCast (InterpState &S, CodePtr OpPC)
bool CheckDestruction (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)
template<>
FixedPoint ReadArg< FixedPoint > (InterpState &S, CodePtr &OpPC)
static LLVM_ATTRIBUTE_UNUSED bool isNoopBuiltin (unsigned ID)
static void discard (InterpStack &Stk, PrimType T)
static APSInt popToAPSInt (InterpStack &Stk, PrimType T)
static APSInt popToAPSInt (InterpState &S, const Expr *E)
static APSInt popToAPSInt (InterpState &S, QualType T)
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 (InterpState &S, const Pointer &Dest, PrimType ValueT, const APSInt &Value)
static QualType getElemType (const Pointer &P)
static void diagnoseNonConstexprBuiltin (InterpState &S, CodePtr OpPC, unsigned ID)
static llvm::APSInt convertBoolVectorToInt (const Pointer &Val)
static bool interp__builtin_is_constant_evaluated (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_assume (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_strcmp (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned ID)
static bool interp__builtin_strlen (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned ID)
static bool interp__builtin_nan (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, bool Signaling)
static bool interp__builtin_inf (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_copysign (InterpState &S, CodePtr OpPC, const InterpFrame *Frame)
static bool interp__builtin_fmin (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, bool IsNumBuiltin)
static bool interp__builtin_fmax (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, bool IsNumBuiltin)
static bool interp__builtin_isnan (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, 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 CallExpr *Call)
static bool interp__builtin_isinf (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, bool CheckSign, const CallExpr *Call)
static bool interp__builtin_isfinite (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_isnormal (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_issubnormal (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_iszero (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_signbit (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp_floating_comparison (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID)
static bool interp__builtin_isfpclass (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, 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 CallExpr *Call)
 Five int values followed by one floating value.
static Floating abs (InterpState &S, const Floating &In)
static bool interp__builtin_fabs (InterpState &S, CodePtr OpPC, const InterpFrame *Frame)
static bool interp__builtin_abs (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_popcount (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_parity (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_clrsb (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_bitreverse (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_classify_type (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_expect (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_rotate (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, bool Right)
 rotateleft(value, amount)
static bool interp__builtin_ffs (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_addressof (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_move (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_eh_return_data_regno (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_overflowop (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned BuiltinOp)
static bool interp__builtin_carryop (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned BuiltinOp)
 Three integral values followed by a pointer (lhs, rhs, carry, carryOut).
static bool interp__builtin_clz (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned BuiltinOp)
static bool interp__builtin_ctz (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned BuiltinID)
static bool interp__builtin_bswap (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_atomic_lock_free (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned BuiltinOp)
 bool __atomic_always_lock_free(size_t, void const volatile*) bool __atomic_is_lock_free(size_t, void const volatile*)
static bool interp__builtin_c11_atomic_is_lock_free (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
 bool __c11_atomic_is_lock_free(size_t)
static bool interp__builtin_complex (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, 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 CallExpr *Call, unsigned BuiltinOp)
 __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 CallExpr *Call)
 __builtin_assume_aligned(Ptr, Alignment[, ExtraOffset])
static bool interp__builtin_ia32_bextr (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_ia32_bzhi (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_ia32_lzcnt (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_ia32_tzcnt (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_ia32_pdep (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_ia32_pext (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_ia32_addcarry_subborrow (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned BuiltinOp)
 (CarryIn, LHS, RHS, Result)
static bool interp__builtin_os_log_format_buffer_size (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_ptrauth_string_discriminator (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_operator_new (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_operator_delete (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_arithmetic_fence (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_vector_reduce (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID)
static bool interp__builtin_elementwise_abs (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned BuiltinID)
static bool interp__builtin_elementwise_popcount (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned BuiltinID)
 Can be called with an integer or vector as the first and only parameter.
static bool interp__builtin_elementwise_countzeroes (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call, unsigned BuiltinID)
 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 CallExpr *Call, unsigned ID)
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 CallExpr *Call, unsigned ID)
static bool interp__builtin_memchr (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID)
static std::optional< unsignedcomputeFullDescSize (const ASTContext &ASTCtx, const Descriptor *Desc)
static unsigned computePointerOffset (const ASTContext &ASTCtx, const Pointer &Ptr)
 Compute the byte offset of Ptr in the full declaration.
static bool pointsToLastObject (const Pointer &Ptr)
 Does Ptr point to the last subobject?
static bool isUserWritingOffTheEnd (const ASTContext &Ctx, const Pointer &Ptr)
 Does Ptr point to the last object AND to a flexible array member?
static bool interp__builtin_object_size (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call)
static bool interp__builtin_is_within_lifetime (InterpState &S, CodePtr OpPC, const CallExpr *Call)
static bool interp__builtin_elementwise_int_binop (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< APInt(const APSInt &, const APSInt &)> Fn)
static bool interp__builtin_elementwise_maxmin (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned BuiltinID)
static bool interp__builtin_ia32_pmul (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned BuiltinID)
static bool interp__builtin_elementwise_triop_fp (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< APFloat(const APFloat &, const APFloat &, const APFloat &, llvm::RoundingMode)> Fn)
static bool interp__builtin_select (InterpState &S, CodePtr OpPC, const CallExpr *Call)
 AVX512 predicated move: "Result = Mask[] ? LHS[] : RHS[]".
static bool interp__builtin_blend (InterpState &S, CodePtr OpPC, const CallExpr *Call)
static bool interp__builtin_elementwise_triop (InterpState &S, CodePtr OpPC, const CallExpr *Call, llvm::function_ref< APInt(const APSInt &, const APSInt &, const APSInt &)> Fn)
static bool interp__builtin_x86_insert_subvector (InterpState &S, CodePtr OpPC, const CallExpr *Call, unsigned ID)
static void zeroAll (Pointer &Dest)
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, 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)
constexpr bool isSignedType (PrimType T)
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, interp::CastKind CK)
constexpr bool isIntegralType (PrimType T)
template<typename T>
constexpr bool needsAlloc ()
constexpr bool needsAlloc (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 = llvm::APFloat

Definition at line 27 of file Floating.h.

◆ APInt

using clang::interp::APInt = llvm::APInt

Definition at line 19 of file FixedPoint.h.

◆ APSInt

using clang::interp::APSInt = llvm::APSInt

Definition at line 20 of file FixedPoint.h.

◆ BlockCtorFn

Initial value:
void (*)(Block *Storage, std::byte *FieldPtr, bool IsConst,
bool IsMutable, bool IsVolatile, bool IsActive,
bool InUnion, const Descriptor *FieldDesc)
A memory block, either on the stack or in the heap.
Definition InterpBlock.h:44
Describes a memory block created by an allocation site.
Definition Descriptor.h:122

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

Initial value:
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.

◆ CompareFn

Definition at line 1003 of file Interp.h.

◆ DeclTy

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

Definition at line 29 of file Descriptor.h.

◆ FixedPointSemantics

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

Definition at line 41 of file Interp.h.

◆ FunctionDeclTy

Initial value:
llvm::PointerUnion<const FunctionDecl *, const BlockExpr *>

Definition at line 64 of file Function.h.

◆ InitMapPtr

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

Definition at line 30 of file Descriptor.h.

◆ SourceMap

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

Definition at line 97 of file Source.h.

Enumeration Type Documentation

◆ ArithOp

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

Definition at line 302 of file Interp.h.

◆ CastKind

enum class clang::interp::CastKind : uint8_t
strong
Enumerator
Reinterpret 
Volatile 
Dynamic 

Definition at line 102 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 44 of file Descriptor.h.

◆ IncDecOp

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

Definition at line 795 of file Interp.h.

◆ Lifetime

enum class clang::interp::Lifetime : uint8_t
strong
Enumerator
Started 
Ended 

Definition at line 56 of file Descriptor.h.

◆ Opcode

enum clang::interp::Opcode : uint32_t

Definition at line 21 of file Opcode.h.

◆ PrimType

enum clang::interp::PrimType : uint8_t

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_MemberPtr 

Definition at line 34 of file PrimType.h.

◆ PushVal

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

Definition at line 791 of file Interp.h.

◆ ScopeKind

enum class clang::interp::ScopeKind
strong
Enumerator
Call 
Block 

Definition at line 105 of file Compiler.h.

◆ ShiftDir

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

Definition at line 165 of file Interp.h.

◆ Storage

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

Definition at line 59 of file Pointer.h.

Function Documentation

◆ abs()

Floating clang::interp::abs ( InterpState & S,
const Floating & In )
inlinestatic

◆ Activate()

◆ ActivateThisField()

◆ Add()

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

◆ Addf()

◆ AddOffset()

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

◆ AddSubMulHelper()

◆ align()

◆ aligned() [1/2]

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

Definition at line 192 of file PrimType.h.

References aligned().

◆ aligned() [2/2]

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

◆ Alloc()

◆ AllocCN()

◆ AllocN()

◆ arePotentiallyOverlappingStringLiterals()

◆ ArrayDecay()

◆ ArrayElem()

◆ ArrayElemPop()

◆ ArrayElemPtr()

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

◆ ArrayElemPtrPop()

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

◆ assignInteger()

◆ Assume()

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

References clang::interp::InterpState::allocAP(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.

◆ BitCast()

◆ BitCastPrim()

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

References clang::interp::InterpState::allocAP(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, 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 648 of file Interp.h.

References clang::interp::InterpState::allocAP(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.

◆ Call()

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

Definition at line 1553 of file Interp.cpp.

References clang::AK_MemberCall, clang::interp::Pointer::block(), CheckActive(), CheckCallable(), CheckCallDepth(), checkConstructor(), CheckDestructor(), clang::interp::State::checkingPotentialConstantExpression(), CheckInvoke(), cleanup(), cleanupAfterFunctionCall(), compileFunction(), clang::interp::InterpState::Current, clang::Func, clang::interp::InterpFrame::getFunction(), clang::interp::InterpState::InitializingBlocks, Interpret(), clang::interp::Pointer::isDummy(), clang::interp::Function::isLambdaStaticInvoker(), clang::interp::Pointer::isZero(), clang::interp::InterpStack::peek(), primSize(), PT_Ptr, clang::interp::InterpState::Stk, and clang::Success.

Referenced by interp__builtin_abs(), interp__builtin_addressof(), interp__builtin_arithmetic_fence(), interp__builtin_assume(), interp__builtin_assume_aligned(), interp__builtin_atomic_lock_free(), interp__builtin_bitreverse(), interp__builtin_blend(), interp__builtin_bswap(), interp__builtin_c11_atomic_is_lock_free(), interp__builtin_carryop(), interp__builtin_classify_type(), interp__builtin_clrsb(), interp__builtin_clz(), interp__builtin_complex(), interp__builtin_ctz(), interp__builtin_eh_return_data_regno(), interp__builtin_elementwise_abs(), interp__builtin_elementwise_countzeroes(), interp__builtin_elementwise_int_binop(), interp__builtin_elementwise_maxmin(), interp__builtin_elementwise_popcount(), interp__builtin_elementwise_triop(), interp__builtin_elementwise_triop_fp(), 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_pmul(), interp__builtin_ia32_tzcnt(), interp__builtin_inf(), interp__builtin_is_aligned_up_down(), interp__builtin_is_constant_evaluated(), interp__builtin_is_within_lifetime(), 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_memchr(), interp__builtin_memcmp(), interp__builtin_memcpy(), interp__builtin_move(), interp__builtin_nan(), interp__builtin_object_size(), 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_select(), interp__builtin_signbit(), interp__builtin_strcmp(), interp__builtin_strlen(), interp__builtin_vector_reduce(), interp__builtin_x86_insert_subvector(), interp_floating_comparison(), and InterpretBuiltin().

◆ CallBI()

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

◆ CallPtr()

◆ CallVar()

◆ CallVirt()

◆ Cast()

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

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

References clang::interp::InterpState::allocAP(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.

◆ CastAPS()

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

◆ CastFixedPoint()

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

◆ CastFixedPointFloating()

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

◆ CastFixedPointIntegral()

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

◆ CastFloatingFixedPoint()

◆ CastFloatingIntegral()

◆ CastFloatingIntegralAP()

◆ CastFloatingIntegralAPS()

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

References clang::interp::InterpState::allocFloat(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::interp::Floating::toSemantics().

◆ CastIntegralFixedPoint()

template<PrimType Name, class T = typename PrimConv<Name>::T>
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()

◆ CastPointerIntegral()

◆ CastPointerIntegralAP()

◆ CastPointerIntegralAPS()

◆ CheckActive()

◆ CheckAllocations()

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

◆ CheckArray()

◆ CheckArrayInitialized()

◆ CheckArraySize() [1/2]

◆ CheckArraySize() [2/2]

bool clang::interp::CheckArraySize ( InterpState & S,
CodePtr OpPC,
uint64_t NumElems )
inline

◆ CheckBCPResult()

◆ CheckBitCast()

◆ CheckCallable()

◆ CheckCallDepth()

◆ CheckConst()

◆ CheckConstant() [1/2]

◆ CheckConstant() [2/2]

◆ checkConstructor()

◆ CheckDecl()

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

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

Referenced by InvalidDeclRef().

◆ CheckDeleteSource()

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

◆ CheckDestruction()

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

◆ CheckDestructor()

◆ CheckDivRem()

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

◆ CheckDowncast()

◆ CheckDummy()

◆ CheckDynamicMemoryAllocation()

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

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

Definition at line 1094 of file Interp.cpp.

References clang::interp::State::CCEDiag(), clang::interp::InterpState::Current, clang::interp::InterpState::getLangOpts(), and clang::interp::InterpFrame::getSource().

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

◆ CheckExtern()

◆ CheckFieldsInitialized()

◆ CheckFinalLoad()

◆ CheckFloatResult()

◆ CheckGlobalLoad()

◆ CheckInit()

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

Checks if a value can be initialized.

Definition at line 909 of file Interp.cpp.

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

Referenced by Init(), and InitPop().

◆ CheckInvoke()

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

Definition at line 897 of file Interp.cpp.

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

Referenced by Call(), and CallVar().

◆ CheckLifetime()

◆ CheckLiteralType()

◆ CheckLive()

◆ CheckLoad()

◆ CheckLocalLoad()

◆ CheckMutable()

◆ CheckNewDeleteForms()

◆ CheckNewTypeMismatch()

◆ CheckNewTypeMismatchArray()

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

◆ CheckNonNullArg()

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

◆ CheckNonNullArgs()

◆ CheckNull() [1/2]

◆ CheckNull() [2/2]

◆ CheckPointerToIntegralCast()

◆ CheckPseudoDtor()

◆ CheckRange() [1/2]

◆ CheckRange() [2/2]

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

◆ CheckShift()

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

◆ CheckStore()

◆ CheckSubobject()

◆ CheckThis()

◆ CheckVolatile()

◆ CheckWeak()

◆ cleanupAfterFunctionCall()

◆ CMP3()

◆ CmpHelper()

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

◆ CmpHelper< Pointer >()

◆ CmpHelperEQ()

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

Definition at line 1018 of file Interp.h.

References CmpHelper(), and Fn.

Referenced by EQ(), and NE().

◆ CmpHelperEQ< MemberPointer >()

◆ CmpHelperEQ< Pointer >()

◆ collectBlocks()

◆ collectNonNullArgs()

llvm::BitVector clang::interp::collectNonNullArgs ( const FunctionDecl * F,
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 985 of file Interp.h.

References clang::interp::InterpState::allocAP(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.

◆ Compare()

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

◆ compileFunction()

void clang::interp::compileFunction ( InterpState & S,
const Function * Func )
static

◆ computeFullDescSize()

◆ computePointerOffset()

◆ Const()

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

◆ ConstFloat()

◆ convertBoolVectorToInt()

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

◆ copyPrimitiveMemory() [1/2]

template<typename T>
void clang::interp::copyPrimitiveMemory ( InterpState & S,
const Pointer & Ptr )
static

◆ copyPrimitiveMemory() [2/2]

void clang::interp::copyPrimitiveMemory ( InterpState & S,
const Pointer & Ptr,
PrimType T )
static

◆ copyRecord()

◆ Dec()

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

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

References clang::AK_Decrement, CheckLoad(), IncDecHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

◆ DecayPtr()

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

OldPtr -> Integer -> NewPtr.

Definition at line 3434 of file Interp.h.

References isPtrType(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

◆ Decf()

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

◆ DecfPop()

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

◆ DecPop()

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

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

References clang::AK_Decrement, CheckLoad(), IncDecHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

◆ DecPtr()

◆ Destroy()

◆ diagnoseEnumValue()

◆ diagnoseNonConstexprBuiltin()

◆ DiagnoseUninitialized() [1/2]

◆ DiagnoseUninitialized() [2/2]

◆ DiagnoseUninitializedSubobject()

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

◆ DiagTypeid()

◆ discard()

◆ Div()

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

◆ Divc()

◆ Divf()

◆ DoBitCast()

◆ DoBitCastPtr() [1/2]

◆ DoBitCastPtr() [2/2]

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

◆ DoShiftAP()

◆ Dump()

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

◆ Dup()

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

◆ EndLifetime()

bool clang::interp::EndLifetime ( InterpState & S,
CodePtr OpPC )

Ends the lifetime of the peek'd pointer.

Definition at line 1852 of file Interp.cpp.

References clang::AK_Destroy, CheckDummy(), endLifetimeRecurse(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.

◆ EndLifetimePop()

bool clang::interp::EndLifetimePop ( InterpState & S,
CodePtr OpPC )

Ends the lifetime of the pop'd pointer.

Definition at line 1866 of file Interp.cpp.

References clang::AK_Destroy, CheckDummy(), endLifetimeRecurse(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

◆ endLifetimeRecurse()

◆ EndSpeculation()

◆ EQ()

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

Definition at line 1228 of file Interp.h.

References CmpHelperEQ(), and clang::Equal.

◆ Error()

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

Do nothing and just abort execution.

Definition at line 3309 of file Interp.h.

Referenced by interp__builtin_is_within_lifetime().

◆ ExpandPtr()

◆ finishGlobalRecurse()

◆ FinishInit()

◆ FinishInitActivate()

◆ FinishInitActivatePop()

◆ FinishInitGlobal()

◆ FinishInitPop()

◆ Flip()

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

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

Definition at line 1314 of file Interp.h.

References clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

◆ FnPtrCast()

◆ Free()

◆ GE()

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

Definition at line 1289 of file Interp.h.

References CmpHelper(), clang::Equal, and clang::Greater.

◆ getBoolValue()

std::optional< bool > clang::interp::getBoolValue ( const Expr * E)
static

◆ getElemType()

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

References clang::interp::Pointer::atField(), CheckLoad(), CheckNull(), CheckRange(), clang::CSK_Field, clang::interp::InterpStack::peek(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.

◆ getField()

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

References clang::interp::Pointer::atField(), CheckLoad(), CheckNull(), CheckRange(), clang::CSK_Field, clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.

◆ GetFnPtr()

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

◆ GetGlobal()

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

◆ GetGlobalUnchecked()

◆ GetIntPtr()

◆ GetLocal()

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

◆ GetMemberPtr()

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

◆ GetMemberPtrBase()

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

◆ GetMemberPtrBasePop()

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

◆ GetMemberPtrDecl()

◆ GetParam()

◆ GetPtrBase()

◆ GetPtrBasePop()

◆ GetPtrDerivedPop()

◆ GetPtrField()

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

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

Definition at line 1447 of file Interp.cpp.

References getField(), clang::interp::InterpStack::peek(), and clang::interp::InterpState::Stk.

◆ GetPtrFieldPop()

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

◆ GetPtrGlobal()

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

◆ GetPtrLocal()

◆ GetPtrParam()

◆ GetPtrThisBase()

◆ GetPtrThisField()

◆ GetPtrThisVirtBase()

◆ GetPtrVirtBasePop()

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

◆ getRoundingMode()

◆ getSwappedBytes() [1/3]

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

Definition at line 188 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 377 of file IntegralAP.h.

◆ GetThisField()

◆ GetTypeid()

bool clang::interp::GetTypeid ( InterpState & S,
CodePtr OpPC,
const Type * TypePtr,
const Type * TypeInfoType )

Typeid support.

Definition at line 2088 of file Interp.cpp.

References clang::interp::InterpStack::push(), and clang::interp::InterpState::Stk.

◆ GetTypeidPtr()

◆ GT()

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

Definition at line 1282 of file Interp.h.

References CmpHelper(), and clang::Greater.

◆ handleFixedPointOverflow()

◆ handleOverflow()

◆ hasVirtualDestructor()

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

Definition at line 1251 of file Interp.cpp.

References clang::T.

Referenced by Free().

◆ Inc()

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

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

References clang::AK_Increment, CheckLoad(), IncDecHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

Referenced by clang::interp::Compiler< Emitter >::visitCXXForRangeStmt(), and clang::interp::Compiler< Emitter >::visitForStmt().

◆ IncDecFloatHelper()

◆ IncDecHelper()

◆ IncDecPtrHelper()

template<ArithOp Op>
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

◆ IncfPop()

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

◆ IncPop()

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

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

References clang::AK_Increment, CheckLoad(), IncDecHelper(), clang::interp::InterpStack::pop(), and clang::interp::InterpState::Stk.

◆ IncPtr()

◆ Init()

◆ InitBitField()

◆ InitBitFieldActivate()

◆ InitElem()

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

◆ InitElemPop()

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

References clang::interp::Pointer::atField(), CheckArray(), CheckRange(), clang::CSK_Field, clang::interp::Pointer::deref(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::interp::InterpState::Stk, and clang::T.

◆ InitFieldActivate()

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

◆ InitGlobal()

◆ InitGlobalTemp()

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

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

References clang::interp::Descriptor::asExpr(), clang::ConstantFold, clang::interp::State::EvalMode, clang::interp::Pointer::getDeclDesc(), clang::interp::InterpStack::peek(), clang::interp::InterpState::SeenGlobalTemporaries, and clang::interp::InterpState::Stk.

◆ InitPop()

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

◆ InitScope()

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

◆ InitThisBitField()

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

◆ InitThisBitFieldActivate()

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

◆ InitThisField()

◆ InitThisFieldActivate()

◆ interp__builtin_abs()

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

◆ interp__builtin_addressof()

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

◆ interp__builtin_arithmetic_fence()

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

◆ interp__builtin_assume()

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

◆ interp__builtin_assume_aligned()

◆ interp__builtin_atomic_lock_free()

◆ interp__builtin_bitreverse()

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

◆ interp__builtin_blend()

◆ interp__builtin_bswap()

◆ interp__builtin_c11_atomic_is_lock_free()

◆ interp__builtin_carryop()

bool clang::interp::interp__builtin_carryop ( InterpState & S,
CodePtr OpPC,
const InterpFrame * Frame,
const CallExpr * Call,
unsigned BuiltinOp )
static

◆ interp__builtin_classify_type()

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

◆ interp__builtin_clrsb()

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

◆ interp__builtin_clz()

◆ interp__builtin_complex()

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

__builtin_complex(Float A, float B);

Definition at line 1149 of file InterpBuiltin.cpp.

References Call(), clang::interp::InterpStack::peek(), clang::interp::InterpStack::pop(), clang::Result, and clang::interp::InterpState::Stk.

Referenced by InterpretBuiltin().

◆ interp__builtin_copysign()

◆ interp__builtin_ctz()

◆ interp__builtin_eh_return_data_regno()

◆ interp__builtin_elementwise_abs()

◆ interp__builtin_elementwise_countzeroes()

◆ interp__builtin_elementwise_int_binop()

◆ interp__builtin_elementwise_maxmin()

◆ interp__builtin_elementwise_popcount()

◆ interp__builtin_elementwise_triop()

◆ interp__builtin_elementwise_triop_fp()

◆ interp__builtin_expect()

◆ interp__builtin_fabs()

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

◆ interp__builtin_ffs()

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

◆ interp__builtin_fmax()

◆ interp__builtin_fmin()

◆ interp__builtin_fpclassify()

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

◆ interp__builtin_ia32_addcarry_subborrow()

bool clang::interp::interp__builtin_ia32_addcarry_subborrow ( InterpState & S,
CodePtr OpPC,
const InterpFrame * Frame,
const CallExpr * Call,
unsigned BuiltinOp )
static

◆ interp__builtin_ia32_bextr()

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

◆ interp__builtin_ia32_bzhi()

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

Definition at line 1351 of file InterpBuiltin.cpp.

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

Referenced by InterpretBuiltin().

◆ interp__builtin_ia32_lzcnt()

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

Definition at line 1373 of file InterpBuiltin.cpp.

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

Referenced by InterpretBuiltin().

◆ interp__builtin_ia32_pdep()

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

Definition at line 1399 of file InterpBuiltin.cpp.

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

Referenced by InterpretBuiltin().

◆ interp__builtin_ia32_pext()

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

Definition at line 1419 of file InterpBuiltin.cpp.

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

Referenced by InterpretBuiltin().

◆ interp__builtin_ia32_pmul()

◆ interp__builtin_ia32_tzcnt()

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

Definition at line 1386 of file InterpBuiltin.cpp.

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

Referenced by InterpretBuiltin().

◆ interp__builtin_inf()

◆ interp__builtin_is_aligned_up_down()

◆ interp__builtin_is_constant_evaluated()

◆ interp__builtin_is_within_lifetime()

◆ interp__builtin_isfinite()

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

◆ interp__builtin_isfpclass()

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

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

Definition at line 583 of file InterpBuiltin.cpp.

References Call(), clang::interp::Context::classify(), clang::interp::Floating::classify(), clang::interp::InterpState::getContext(), clang::interp::InterpStack::pop(), popToAPSInt(), pushInteger(), clang::Result, and clang::interp::InterpState::Stk.

Referenced by InterpretBuiltin().

◆ interp__builtin_isinf()

bool clang::interp::interp__builtin_isinf ( InterpState & S,
CodePtr OpPC,
const InterpFrame * Frame,
bool CheckSign,
const CallExpr * Call )
static

◆ interp__builtin_isnan()

bool clang::interp::interp__builtin_isnan ( InterpState & S,
CodePtr OpPC,
const InterpFrame * Frame,
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 471 of file InterpBuiltin.cpp.

References Call(), clang::interp::Floating::isNan(), clang::interp::InterpStack::pop(), pushInteger(), and clang::interp::InterpState::Stk.

Referenced by InterpretBuiltin().

◆ interp__builtin_isnormal()

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

◆ interp__builtin_issignaling()

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

◆ interp__builtin_issubnormal()

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

◆ interp__builtin_iszero()

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

◆ interp__builtin_memchr()

◆ interp__builtin_memcmp()

◆ interp__builtin_memcpy()

◆ interp__builtin_move()

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

Definition at line 790 of file InterpBuiltin.cpp.

References Call().

Referenced by InterpretBuiltin().

◆ interp__builtin_nan()

◆ interp__builtin_object_size()

◆ interp__builtin_operator_delete()

◆ interp__builtin_operator_new()

◆ interp__builtin_os_log_format_buffer_size()

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

◆ interp__builtin_overflowop()

◆ interp__builtin_parity()

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

◆ interp__builtin_popcount()

◆ interp__builtin_ptrauth_string_discriminator()

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

◆ interp__builtin_rotate()

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

◆ interp__builtin_select()

◆ interp__builtin_signbit()

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

◆ interp__builtin_strcmp()

◆ interp__builtin_strlen()

◆ interp__builtin_vector_reduce()

◆ interp__builtin_x86_insert_subvector()

◆ interp_floating_comparison()

bool clang::interp::interp_floating_comparison ( InterpState & S,
CodePtr OpPC,
const CallExpr * Call,
unsigned ID )
static

◆ Interpret()

◆ InterpretBuiltin()

bool clang::interp::InterpretBuiltin ( InterpState & S,
CodePtr OpPC,
const CallExpr * Call,
uint32_t BuiltinID )

Interpret a builtin function.

Definition at line 2959 of file InterpBuiltin.cpp.

References clang::ASTContext::BuiltinInfo, clang::C, Call(), clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpState::getASTContext(), clang::interp::InterpFrame::getLocation(), clang::interp::InterpFrame::getRange(), interp__builtin_abs(), interp__builtin_addressof(), interp__builtin_arithmetic_fence(), interp__builtin_assume(), interp__builtin_assume_aligned(), interp__builtin_atomic_lock_free(), interp__builtin_bitreverse(), interp__builtin_blend(), interp__builtin_bswap(), interp__builtin_c11_atomic_is_lock_free(), interp__builtin_carryop(), interp__builtin_classify_type(), interp__builtin_clrsb(), interp__builtin_clz(), interp__builtin_complex(), interp__builtin_copysign(), interp__builtin_ctz(), interp__builtin_eh_return_data_regno(), interp__builtin_elementwise_abs(), interp__builtin_elementwise_countzeroes(), interp__builtin_elementwise_int_binop(), interp__builtin_elementwise_maxmin(), interp__builtin_elementwise_popcount(), interp__builtin_elementwise_triop(), interp__builtin_elementwise_triop_fp(), 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_pmul(), interp__builtin_ia32_tzcnt(), interp__builtin_inf(), interp__builtin_is_aligned_up_down(), interp__builtin_is_constant_evaluated(), interp__builtin_is_within_lifetime(), 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_memchr(), interp__builtin_memcmp(), interp__builtin_memcpy(), interp__builtin_move(), interp__builtin_nan(), interp__builtin_object_size(), 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_select(), interp__builtin_signbit(), interp__builtin_strcmp(), interp__builtin_strlen(), interp__builtin_vector_reduce(), interp__builtin_x86_insert_subvector(), interp_floating_comparison(), InterpretBuiltin(), clang::Invalid, clang::Builtin::Context::isConstantEvaluated(), isNoopBuiltin(), pushInteger(), clang::T, and X.

Referenced by CallBI(), and InterpretBuiltin().

◆ InterpretOffsetOf()

◆ Inv()

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

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

References clang::interp::InterpState::Current, clang::interp::State::FFDiag(), clang::interp::InterpFrame::getLocation(), and clang::interp::InterpFrame::getRange().

Referenced by OffsetHelper().

◆ InvalidCast()

◆ InvalidDeclRef()

◆ InvalidNewDeleteExpr()

◆ InvalidShuffleVectorIndex()

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

◆ IsConstantContext()

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

◆ isConstexprUnknown()

◆ isIntegralType()

◆ IsNonNull()

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

◆ isNoopBuiltin()

LLVM_ATTRIBUTE_UNUSED bool clang::interp::isNoopBuiltin ( unsigned ID)
static

Definition at line 26 of file InterpBuiltin.cpp.

Referenced by InterpretBuiltin().

◆ isOneByteCharacterType()

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

References clang::T.

Referenced by interp__builtin_memcmp().

◆ IsOpaqueConstantCall()

bool clang::interp::IsOpaqueConstantCall ( const CallExpr * E)
inlinestatic

Definition at line 1065 of file Interp.h.

References clang::CallExpr::getBuiltinCallee().

Referenced by CmpHelperEQ< Pointer >().

◆ isPtrType()

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

◆ isSignedType()

bool clang::interp::isSignedType ( PrimType T)
inlineconstexpr

Definition at line 89 of file PrimType.h.

References PT_Sint16, PT_Sint32, PT_Sint64, PT_Sint8, and clang::T.

◆ isUserWritingOffTheEnd()

bool clang::interp::isUserWritingOffTheEnd ( const ASTContext & Ctx,
const Pointer & Ptr )
static

Does Ptr point to the last object AND to a flexible array member?

Definition at line 2389 of file InterpBuiltin.cpp.

References clang::interp::Pointer::getFieldDesc(), clang::ASTContext::getLangOpts(), clang::interp::Descriptor::isArray(), clang::interp::Pointer::isDummy(), and pointsToLastObject().

◆ LE()

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

◆ Load()

◆ LoadPop()

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

◆ LT()

◆ Memcpy()

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

◆ Mul()

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

◆ Mulc()

◆ Mulf()

◆ NarrowPtr()

◆ NE()

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

Definition at line 1260 of file Interp.h.

References CmpHelperEQ(), and clang::Equal.

Referenced by ctorArrayTy(), and dtorArrayTy().

◆ needsAlloc() [1/2]

◆ needsAlloc() [2/2]

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

Definition at line 129 of file PrimType.h.

References PT_Float, PT_IntAP, PT_IntAPS, and clang::T.

◆ Neg()

◆ NoRet()

◆ 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

◆ OffsetHelper()

◆ OffsetOf()

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

◆ operator<<() [1/8]

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

Definition at line 154 of file Boolean.h.

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

◆ operator<<() [2/8]

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

Definition at line 828 of file Pointer.h.

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

◆ operator<<() [3/8]

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

Definition at line 190 of file FixedPoint.h.

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

◆ operator<<() [4/8]

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/8]

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

Definition at line 341 of file Integral.h.

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

◆ operator<<() [6/8]

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

Definition at line 370 of file IntegralAP.h.

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

◆ operator<<() [7/8]

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

Definition at line 108 of file PrimType.h.

References Dynamic, Reinterpret, and Volatile.

◆ operator<<() [8/8]

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

Definition at line 115 of file MemberPointer.h.

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

◆ pointsToLastObject()

◆ Pop()

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

◆ popArg()

◆ PopCC()

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

Definition at line 3303 of file Interp.h.

References clang::interp::InterpState::ConstantContextOverride.

◆ popToAPSInt() [1/3]

APSInt clang::interp::popToAPSInt ( InterpStack & Stk,
PrimType T )
static

◆ popToAPSInt() [2/3]

◆ popToAPSInt() [3/3]

◆ PreDec()

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

◆ PreInc()

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

◆ primSize()

◆ PtrPtrCast()

◆ PushCC()

bool clang::interp::PushCC ( InterpState & S,
CodePtr OpPC,
bool Value )
inline

Definition at line 3299 of file Interp.h.

References clang::interp::InterpState::ConstantContextOverride.

◆ pushInteger() [1/2]

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

References clang::interp::InterpState::allocAP(), clang::interp::Context::classify(), clang::interp::InterpState::getASTContext(), clang::interp::InterpState::getContext(), clang::ASTContext::getTypeSize(), INT_TYPE_SWITCH, clang::Type::isSignedIntegerOrEnumerationType(), clang::Type::isUnsignedIntegerOrEnumerationType(), PT_IntAP, PT_IntAPS, clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, 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_ctz(), interp__builtin_eh_return_data_regno(), interp__builtin_elementwise_abs(), interp__builtin_elementwise_countzeroes(), interp__builtin_elementwise_int_binop(), interp__builtin_elementwise_maxmin(), interp__builtin_elementwise_popcount(), interp__builtin_elementwise_triop(), 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_is_within_lifetime(), 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_object_size(), 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>
void clang::interp::pushInteger ( InterpState & S,
T Val,
QualType QT )
static

Definition at line 93 of file InterpBuiltin.cpp.

References pushInteger(), and clang::T.

◆ ReadArg()

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

◆ ReadArg< FixedPoint >()

◆ ReadArg< Floating >()

◆ ReadArg< IntegralAP< false > >()

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

Definition at line 3711 of file Interp.h.

◆ ReadArg< IntegralAP< true > >()

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

Definition at line 3711 of file Interp.h.

◆ readPointerToBuffer()

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

References clang::interp::InterpState::allocAP(), CheckDivRem(), needsAlloc(), clang::interp::InterpStack::pop(), clang::interp::InterpStack::push(), clang::Result, clang::interp::InterpState::Stk, and clang::T.

◆ Ret()

◆ RetVoid()

◆ RunDestructors()

◆ runRecordDestructor()

◆ RVOPtr()

◆ SetField()

◆ SetGlobal()

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

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

References clang::interp::InterpState::Current, clang::interp::InterpStack::pop(), clang::interp::InterpFrame::setLocal(), clang::interp::InterpState::Stk, and clang::T.

◆ SetParam()

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

◆ SetThisField()

◆ SetThreeWayComparisonField()

◆ ShiftFixedPoint()

◆ Shl()

◆ Shr()

◆ SideEffect()

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

Definition at line 3311 of file Interp.h.

References clang::interp::InterpState::noteSideEffect().

◆ SizelessVectorElementSize()

◆ StartLifetime()

bool clang::interp::StartLifetime ( InterpState & S,
CodePtr OpPC )

◆ startLifetimeRecurse()

◆ StartSpeculation()

◆ Store()

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

◆ StoreActivate()

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

◆ StoreActivatePop()

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

◆ StoreBitField()

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

◆ StoreBitFieldActivate()

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

◆ StoreBitFieldActivatePop()

template<PrimType Name, class T = typename PrimConv<Name>::T>
bool clang::interp::StoreBitFieldActivatePop ( 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 )

◆ Sub()

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

◆ Subf()

◆ SubOffset()

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

◆ SubPtr()

◆ swapBytes()

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

◆ This()

◆ ToMemberPtr()

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

◆ Unsupported()

◆ VirtBaseHelper()

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

◆ Zero()

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

Definition at line 2771 of file Interp.h.

References clang::interp::InterpStack::push(), clang::interp::InterpState::Stk, and clang::T.

Referenced by Divc().

◆ zeroAll()

◆ ZeroIntAP()

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

◆ ZeroIntAPS()

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