clang 20.0.0git
|
Classes | |
class | ArrayIndexScope |
class | Block |
A memory block, either on the stack or in the heap. More... | |
struct | BlockPointer |
class | BlockScope |
Scope for storage declared in a compound statement. More... | |
class | Boolean |
Wrapper around boolean types. More... | |
class | ByteCodeEmitter |
An emitter which links the program to bytecode for later use. More... | |
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 |
Emits the destructors of the variables of. More... | |
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 | Floating |
class | Frame |
Base class for stack frames, shared between VM and walker. More... | |
class | Function |
Bytecode function. More... | |
class | FunctionPointer |
struct | GlobalInlineDescriptor |
Descriptor used for global variables. More... | |
struct | InitLink |
class | InitLinkScope |
struct | InitMap |
Bitfield tracking the initialisation status of elements of primitive arrays. More... | |
class | InitStackScope |
struct | InlineDescriptor |
Inline descriptor embedded in structures and arrays. More... | |
class | Integral |
Wrapper around numeric types. More... | |
class | IntegralAP |
class | InterpFrame |
Frame storing local variables. More... | |
class | InterpStack |
Stack frame storing temporaries and parameters. More... | |
class | InterpState |
Interpreter context. More... | |
struct | IntPointer |
class | LabelScope |
Scope managing label targets. More... | |
class | LocalScope |
Generic scope for local variables. More... | |
class | LoopScope |
Sets the context for break/continue statements. More... | |
class | MemberPointer |
class | OptionScope |
Scope used to handle initialization methods. More... | |
struct | ParamOffset |
class | Pointer |
A pointer to a memory block, live or dead. More... | |
struct | PrimConv |
Mapping from primitive types to their representation. More... | |
struct | PrimConv< PT_Bool > |
struct | PrimConv< PT_Float > |
struct | PrimConv< PT_FnPtr > |
struct | PrimConv< PT_IntAP > |
struct | PrimConv< PT_IntAPS > |
struct | PrimConv< PT_MemberPtr > |
struct | PrimConv< PT_Ptr > |
struct | PrimConv< PT_Sint16 > |
struct | PrimConv< PT_Sint32 > |
struct | PrimConv< PT_Sint64 > |
struct | PrimConv< PT_Sint8 > |
struct | PrimConv< PT_Uint16 > |
struct | PrimConv< PT_Uint32 > |
struct | PrimConv< PT_Uint64 > |
struct | PrimConv< PT_Uint8 > |
class | Program |
The program contains and links the bytecode for all functions. More... | |
class | Record |
Structure/Class descriptor. More... | |
struct | Repr |
struct | Repr< 16, false > |
struct | Repr< 16, true > |
struct | Repr< 32, false > |
struct | Repr< 32, true > |
struct | Repr< 64, false > |
struct | Repr< 64, true > |
struct | Repr< 8, false > |
struct | Repr< 8, true > |
class | Scope |
Describes a scope block. More... | |
class | SourceInfo |
Describes the statement/declaration an opcode was generated from. More... | |
class | SourceLocScope |
class | SourceMapper |
Interface for classes which map locations to sources. More... | |
class | State |
Interface for the VM to interact with the AST walker's context. More... | |
class | StmtExprScope |
class | SwitchScope |
struct | VarCreationState |
State encapsulating if a the variable creation has been successful, unsuccessful, or no variable has been created at all. More... | |
class | VariableScope |
Scope chain managing the variable lifetimes. More... | |
Typedefs | |
using | DeclTy = llvm::PointerUnion< const Decl *, const Expr * > |
using | InitMapPtr = std::optional< std::pair< bool, std::shared_ptr< InitMap > > > |
using | BlockCtorFn = void(*)(Block *Storage, std::byte *FieldPtr, bool IsConst, bool IsMutable, bool IsActive, const Descriptor *FieldDesc) |
Invoked whenever a block is created. | |
using | BlockDtorFn = void(*)(Block *Storage, std::byte *FieldPtr, const Descriptor *FieldDesc) |
Invoked when a block is destroyed. | |
using | BlockMoveFn = void(*)(Block *Storage, const std::byte *SrcFieldPtr, std::byte *DstFieldPtr, const Descriptor *FieldDesc) |
Invoked when a block with pointers referencing it goes out of scope. | |
using | APFloat = llvm::APFloat |
using | APSInt = llvm::APSInt |
using | APInt = llvm::APInt |
using | CompareFn = llvm::function_ref< bool(ComparisonCategoryResult)> |
using | SourceMap = std::vector< std::pair< unsigned, SourceInfo > > |
Enumerations | |
enum class | GlobalInitState { Initialized , NoInitializer , InitializerFailed } |
enum class | ArithOp { Add , Sub } |
enum class | PushVal : bool { No , Yes } |
enum class | IncDecOp { Inc , Dec } |
enum class | ShiftDir { Left , Right } |
enum | Opcode : uint32_t |
enum class | Storage { Block , Int , Fn } |
enum | PrimType : unsigned { PT_Sint8 = 0 , PT_Uint8 = 1 , PT_Sint16 = 2 , PT_Uint16 = 3 , PT_Sint32 = 4 , PT_Uint32 = 5 , PT_Sint64 = 6 , PT_Uint64 = 7 , PT_IntAP = 8 , PT_IntAPS = 9 , PT_Bool = 10 , PT_Float = 11 , PT_Ptr = 12 , PT_FnPtr = 13 , PT_MemberPtr = 14 } |
Enumeration of the primitive types of the VM. More... | |
enum class | CastKind : uint8_t { Reinterpret , Atomic } |
Functions | |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, const Boolean &B) |
static void | DiagnoseUninitializedSubobject (InterpState &S, SourceLocation Loc, const FieldDecl *SubObjDecl) |
static bool | CheckFieldsInitialized (InterpState &S, SourceLocation Loc, const Pointer &BasePtr, const Record *R) |
static bool | CheckArrayInitialized (InterpState &S, SourceLocation Loc, const Pointer &BasePtr, const ConstantArrayType *CAT) |
static void | collectBlocks (const Pointer &Ptr, llvm::SetVector< const Block * > &Blocks) |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, Floating F) |
Floating | getSwappedBytes (Floating F) |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, FunctionPointer FP) |
template<unsigned Bits, bool Signed> | |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, Integral< Bits, Signed > I) |
template<bool Signed> | |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, IntegralAP< Signed > I) |
template<bool Signed> | |
IntegralAP< Signed > | getSwappedBytes (IntegralAP< Signed > F) |
static void | popArg (InterpState &S, const Expr *Arg) |
void | cleanupAfterFunctionCall (InterpState &S, CodePtr OpPC) |
bool | CheckExtern (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
Checks if the variable has externally defined storage. | |
bool | CheckArray (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
Checks if the array is offsetable. | |
bool | CheckLive (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) |
Checks if a pointer is live and accessible. | |
bool | CheckConstant (InterpState &S, CodePtr OpPC, const Descriptor *Desc) |
Checks if the Descriptor is of a constexpr or const global variable. | |
static bool | CheckConstant (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
bool | 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. | |
bool | CheckVolatile (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) |
bool | CheckInitialized (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) |
bool | CheckGlobalInitialized (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
Check if a global variable is initialized. | |
bool | CheckLoad (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK=AK_Read) |
Checks if a value can be loaded from a block. | |
bool | CheckStore (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
Checks if a value can be stored in a block. | |
bool | CheckInvoke (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
Checks if a method can be invoked on an object. | |
bool | CheckInit (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
Checks if a value can be initialized. | |
bool | CheckCallable (InterpState &S, CodePtr OpPC, const Function *F) |
Checks if a method can be called. | |
bool | CheckCallDepth (InterpState &S, CodePtr OpPC) |
Checks if calling the currently active function would exceed the allowed call depth. | |
bool | CheckThis (InterpState &S, CodePtr OpPC, const Pointer &This) |
Checks the 'this' pointer. | |
bool | CheckPure (InterpState &S, CodePtr OpPC, const CXXMethodDecl *MD) |
Checks if a method is pure virtual. | |
bool | CheckFloatResult (InterpState &S, CodePtr OpPC, const Floating &Result, APFloat::opStatus Status) |
Checks if the result of a floating-point operation is valid in the current context. | |
bool | CheckDynamicMemoryAllocation (InterpState &S, CodePtr OpPC) |
Checks if dynamic memory allocation is available in the current language mode. | |
bool | CheckNewDeleteForms (InterpState &S, CodePtr OpPC, bool NewWasArray, bool DeleteIsArray, const Descriptor *D, const Expr *NewExpr) |
Diagnose mismatched new[]/delete or new/delete[] pairs. | |
bool | CheckDeleteSource (InterpState &S, CodePtr OpPC, const Expr *Source, const Pointer &Ptr) |
Check the source of the pointer passed to delete/delete[] has actually been heap allocated by us. | |
bool | CheckDeclRef (InterpState &S, CodePtr OpPC, const DeclRefExpr *DR) |
We aleady know the given DeclRefExpr is invalid for some reason, now figure out why and print appropriate diagnostics. | |
bool | CheckDummy (InterpState &S, CodePtr OpPC, const Pointer &Ptr, AccessKinds AK) |
Checks if a pointer is a dummy pointer. | |
bool | CheckNonNullArgs (InterpState &S, CodePtr OpPC, const Function *F, const CallExpr *CE, unsigned ArgSize) |
Checks if all the arguments annotated as 'nonnull' are in fact not null. | |
static bool | runRecordDestructor (InterpState &S, CodePtr OpPC, const Pointer &BasePtr, const Descriptor *Desc) |
bool | RunDestructors (InterpState &S, CodePtr OpPC, const Block *B) |
void | diagnoseEnumValue (InterpState &S, CodePtr OpPC, const EnumDecl *ED, const APSInt &Value) |
bool | Interpret (InterpState &S, APValue &Result) |
Interpreter entry point. | |
template<typename T > | |
bool | ReturnValue (const InterpState &S, const T &V, APValue &R) |
Convert a value to an APValue. | |
bool | SetThreeWayComparisonField (InterpState &S, CodePtr OpPC, const Pointer &Ptr, const APSInt &IntValue) |
Sets the given integral value to the pointer, which is of a std::{weak,partial,strong}_ordering type. | |
bool | DoMemcpy (InterpState &S, CodePtr OpPC, const Pointer &Src, Pointer &Dest) |
Copy the contents of Src into Dest. | |
template<typename LT , typename RT > | |
bool | CheckShift (InterpState &S, CodePtr OpPC, const LT &LHS, const RT &RHS, unsigned Bits) |
Checks if the shift operation is legal. | |
template<typename T > | |
bool | CheckDivRem (InterpState &S, CodePtr OpPC, const T &LHS, const T &RHS) |
Checks if Div/Rem operation on LHS and RHS is valid. | |
template<typename SizeT > | |
bool | CheckArraySize (InterpState &S, CodePtr OpPC, SizeT *NumElements, unsigned ElemSize, bool IsNoThrow) |
bool | InterpretBuiltin (InterpState &S, CodePtr OpPC, const Function *F, const CallExpr *Call) |
Interpret a builtin function. | |
bool | InterpretOffsetOf (InterpState &S, CodePtr OpPC, const OffsetOfExpr *E, llvm::ArrayRef< int64_t > ArrayIndices, int64_t &Result) |
Interpret an offsetof operation. | |
bool | Invalid (InterpState &S, CodePtr OpPC) |
Just emit a diagnostic. | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Ret (InterpState &S, CodePtr &PC, APValue &Result) |
bool | RetVoid (InterpState &S, CodePtr &PC, APValue &Result) |
template<typename T , bool(*)(T, T, unsigned, T *) OpFW, template< typename U > class OpAP> | |
bool | AddSubMulHelper (InterpState &S, CodePtr OpPC, unsigned Bits, const T &LHS, const T &RHS) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Add (InterpState &S, CodePtr OpPC) |
bool | Addf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Sub (InterpState &S, CodePtr OpPC) |
bool | Subf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Mul (InterpState &S, CodePtr OpPC) |
bool | Mulf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | 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, llvm::RoundingMode RM) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Inv (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Neg (InterpState &S, CodePtr OpPC) |
template<typename T , IncDecOp Op, PushVal DoPush> | |
bool | IncDecHelper (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Inc (InterpState &S, CodePtr OpPC) |
1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value increased by one back to the pointer 4) Pushes the original (pre-inc) value on the stack. | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | IncPop (InterpState &S, CodePtr OpPC) |
1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value increased by one back to the pointer | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Dec (InterpState &S, CodePtr OpPC) |
1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value decreased by one back to the pointer 4) Pushes the original (pre-dec) value on the stack. | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | DecPop (InterpState &S, CodePtr OpPC) |
1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value decreased by one back to the pointer | |
template<IncDecOp Op, PushVal DoPush> | |
bool | IncDecFloatHelper (InterpState &S, CodePtr OpPC, const Pointer &Ptr, llvm::RoundingMode RM) |
bool | Incf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) |
bool | IncfPop (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) |
bool | Decf (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) |
bool | DecfPop (InterpState &S, CodePtr OpPC, llvm::RoundingMode RM) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Comp (InterpState &S, CodePtr OpPC) |
1) Pops the value from the stack. | |
template<typename T > | |
bool | CmpHelper (InterpState &S, CodePtr OpPC, CompareFn Fn) |
template<typename T > | |
bool | CmpHelperEQ (InterpState &S, CodePtr OpPC, CompareFn Fn) |
template<> | |
bool | CmpHelper< FunctionPointer > (InterpState &S, CodePtr OpPC, CompareFn Fn) |
Function pointers cannot be compared in an ordered way. | |
template<> | |
bool | CmpHelperEQ< FunctionPointer > (InterpState &S, CodePtr OpPC, CompareFn Fn) |
template<> | |
bool | CmpHelper< Pointer > (InterpState &S, CodePtr OpPC, CompareFn Fn) |
template<> | |
bool | CmpHelperEQ< Pointer > (InterpState &S, CodePtr OpPC, CompareFn Fn) |
template<> | |
bool | CmpHelperEQ< MemberPointer > (InterpState &S, CodePtr OpPC, CompareFn Fn) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | EQ (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | CMP3 (InterpState &S, CodePtr OpPC, const ComparisonCategoryInfo *CmpInfo) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | NE (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | LT (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | LE (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | GT (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | GE (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InRange (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Dup (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Pop (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Const (InterpState &S, CodePtr OpPC, const T &Arg) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | GetLocal (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | SetLocal (InterpState &S, CodePtr OpPC, uint32_t I) |
1) Pops the value from the stack. | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | GetParam (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | SetParam (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | GetField (InterpState &S, CodePtr OpPC, uint32_t I) |
1) Peeks a pointer on the stack 2) Pushes the value of the pointer's field on the stack | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | SetField (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | GetFieldPop (InterpState &S, CodePtr OpPC, uint32_t I) |
1) Pops a pointer from the stack 2) Pushes the value of the pointer's field on the stack | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | GetThisField (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | SetThisField (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | GetGlobal (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | GetGlobalUnchecked (InterpState &S, CodePtr OpPC, uint32_t I) |
Same as GetGlobal, but without the checks. | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | SetGlobal (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitGlobal (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitGlobalTemp (InterpState &S, CodePtr OpPC, uint32_t I, const LifetimeExtendedTemporaryDecl *Temp) |
1) Converts the value on top of the stack to an APValue 2) Sets that APValue on \Temp 3) Initializes global with index \I with that | |
bool | InitGlobalTempComp (InterpState &S, CodePtr OpPC, const LifetimeExtendedTemporaryDecl *Temp) |
1) Converts the value on top of the stack to an APValue 2) Sets that APValue on \Temp 3) Initialized global with index \I with that | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitThisField (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitThisBitField (InterpState &S, CodePtr OpPC, const Record::Field *F, uint32_t FieldOffset) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitThisFieldActive (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitField (InterpState &S, CodePtr OpPC, uint32_t I) |
1) Pops the value from the stack 2) Peeks a pointer from the stack 3) Pushes the value to field I of the pointer on the stack | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitBitField (InterpState &S, CodePtr OpPC, const Record::Field *F) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitFieldActive (InterpState &S, CodePtr OpPC, uint32_t I) |
bool | GetPtrLocal (InterpState &S, CodePtr OpPC, uint32_t I) |
bool | GetPtrParam (InterpState &S, CodePtr OpPC, uint32_t I) |
bool | GetPtrGlobal (InterpState &S, CodePtr OpPC, uint32_t I) |
bool | GetPtrField (InterpState &S, CodePtr OpPC, uint32_t Off) |
1) Peeks a Pointer 2) Pushes Pointer.atField(Off) on the stack | |
bool | GetPtrFieldPop (InterpState &S, CodePtr OpPC, uint32_t Off) |
bool | GetPtrThisField (InterpState &S, CodePtr OpPC, uint32_t Off) |
bool | GetPtrActiveField (InterpState &S, CodePtr OpPC, uint32_t Off) |
bool | GetPtrActiveThisField (InterpState &S, CodePtr OpPC, uint32_t Off) |
bool | GetPtrDerivedPop (InterpState &S, CodePtr OpPC, uint32_t Off) |
bool | GetPtrBase (InterpState &S, CodePtr OpPC, uint32_t Off) |
bool | GetPtrBasePop (InterpState &S, CodePtr OpPC, uint32_t Off) |
bool | GetMemberPtrBasePop (InterpState &S, CodePtr OpPC, int32_t Off) |
bool | GetPtrThisBase (InterpState &S, CodePtr OpPC, uint32_t Off) |
bool | FinishInitPop (InterpState &S, CodePtr OpPC) |
bool | FinishInit (InterpState &S, CodePtr OpPC) |
bool | Dump (InterpState &S, CodePtr OpPC) |
bool | VirtBaseHelper (InterpState &S, CodePtr OpPC, const RecordDecl *Decl, const Pointer &Ptr) |
bool | GetPtrVirtBasePop (InterpState &S, CodePtr OpPC, const RecordDecl *D) |
bool | GetPtrThisVirtBase (InterpState &S, CodePtr OpPC, const RecordDecl *D) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Load (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | LoadPop (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Store (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | StorePop (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | StoreBitField (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | StoreBitFieldPop (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | Init (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitPop (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitElem (InterpState &S, CodePtr OpPC, uint32_t Idx) |
1) Pops the value from the stack 2) Peeks a pointer and gets its index \Idx 3) Sets the value on the pointer, leaving the pointer on the stack. | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | InitElemPop (InterpState &S, CodePtr OpPC, uint32_t Idx) |
The same as InitElem, but pops the pointer as well. | |
bool | Memcpy (InterpState &S, CodePtr OpPC) |
bool | ToMemberPtr (InterpState &S, CodePtr OpPC) |
bool | CastMemberPtrPtr (InterpState &S, CodePtr OpPC) |
template<class T , ArithOp Op> | |
bool | OffsetHelper (InterpState &S, CodePtr OpPC, const T &Offset, const Pointer &Ptr) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | AddOffset (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | SubOffset (InterpState &S, CodePtr OpPC) |
template<ArithOp Op> | |
static bool | IncDecPtrHelper (InterpState &S, CodePtr OpPC, const Pointer &Ptr) |
static bool | IncPtr (InterpState &S, CodePtr OpPC) |
static bool | DecPtr (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | SubPtr (InterpState &S, CodePtr OpPC) |
1) Pops a Pointer from the stack. | |
bool | Destroy (InterpState &S, CodePtr OpPC, uint32_t I) |
template<PrimType TIn, PrimType TOut> | |
bool | Cast (InterpState &S, CodePtr OpPC) |
bool | CastFP (InterpState &S, CodePtr OpPC, const llvm::fltSemantics *Sem, llvm::RoundingMode RM) |
1) Pops a Floating from the stack. | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | CastAP (InterpState &S, CodePtr OpPC, uint32_t BitWidth) |
Like Cast(), but we cast to an arbitrary-bitwidth integral, so we need to know what bitwidth the result should be. | |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | CastAPS (InterpState &S, CodePtr OpPC, uint32_t BitWidth) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | CastIntegralFloating (InterpState &S, CodePtr OpPC, const llvm::fltSemantics *Sem, llvm::RoundingMode RM) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | CastFloatingIntegral (InterpState &S, CodePtr OpPC) |
static bool | CastFloatingIntegralAP (InterpState &S, CodePtr OpPC, uint32_t BitWidth) |
static bool | CastFloatingIntegralAPS (InterpState &S, CodePtr OpPC, uint32_t BitWidth) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | CastPointerIntegral (InterpState &S, CodePtr OpPC) |
static bool | CastPointerIntegralAP (InterpState &S, CodePtr OpPC, uint32_t BitWidth) |
static bool | CastPointerIntegralAPS (InterpState &S, CodePtr OpPC, uint32_t BitWidth) |
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, const Descriptor *Desc) |
bool | This (InterpState &S, CodePtr OpPC) |
bool | RVOPtr (InterpState &S, CodePtr OpPC) |
template<class LT , class RT , ShiftDir Dir> | |
bool | DoShift (InterpState &S, CodePtr OpPC, LT &LHS, RT &RHS) |
template<PrimType NameL, PrimType NameR> | |
bool | Shr (InterpState &S, CodePtr OpPC) |
template<PrimType NameL, PrimType NameR> | |
bool | Shl (InterpState &S, CodePtr OpPC) |
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 | CallVar (InterpState &S, CodePtr OpPC, const Function *Func, uint32_t VarArgSize) |
bool | Call (InterpState &S, CodePtr OpPC, const Function *Func, uint32_t VarArgSize) |
bool | CallVirt (InterpState &S, CodePtr OpPC, const Function *Func, uint32_t VarArgSize) |
bool | CallBI (InterpState &S, CodePtr &PC, const Function *Func, const CallExpr *CE) |
bool | CallPtr (InterpState &S, CodePtr OpPC, uint32_t ArgSize, const CallExpr *CE) |
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 Decl *D) |
bool | GetMemberPtrBase (InterpState &S, CodePtr OpPC) |
bool | GetMemberPtrDecl (InterpState &S, CodePtr OpPC) |
bool | Unsupported (InterpState &S, CodePtr OpPC) |
bool | Error (InterpState &S, CodePtr OpPC) |
Do nothing and just abort execution. | |
bool | InvalidCast (InterpState &S, CodePtr OpPC, CastKind Kind) |
Same here, but only for casts. | |
bool | InvalidDeclRef (InterpState &S, CodePtr OpPC, const DeclRefExpr *DR) |
bool | SizelessVectorElementSize (InterpState &S, CodePtr OpPC) |
bool | Assume (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | OffsetOf (InterpState &S, CodePtr OpPC, const OffsetOfExpr *E) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | CheckNonNullArg (InterpState &S, CodePtr OpPC) |
template<PrimType Name, class T = typename PrimConv<Name>::T> | |
bool | CheckEnumValue (InterpState &S, CodePtr OpPC, const EnumDecl *ED) |
template<PrimType TIn, PrimType TOut> | |
bool | DecayPtr (InterpState &S, CodePtr OpPC) |
OldPtr -> Integer -> NewPtr. | |
bool | CheckDecl (InterpState &S, CodePtr OpPC, const VarDecl *VD) |
bool | Alloc (InterpState &S, CodePtr OpPC, const Descriptor *Desc) |
template<PrimType Name, class SizeT = typename PrimConv<Name>::T> | |
bool | AllocN (InterpState &S, CodePtr OpPC, PrimType T, const Expr *Source, bool IsNoThrow) |
template<PrimType Name, class SizeT = typename PrimConv<Name>::T> | |
bool | AllocCN (InterpState &S, CodePtr OpPC, const Descriptor *ElementDesc, bool IsNoThrow) |
static bool | Free (InterpState &S, CodePtr OpPC, bool DeleteIsArrayForm) |
template<typename T > | |
T | ReadArg (InterpState &S, CodePtr &OpPC) |
template<> | |
Floating | ReadArg< Floating > (InterpState &S, CodePtr &OpPC) |
template<> | |
IntegralAP< false > | ReadArg< IntegralAP< false > > (InterpState &S, CodePtr &OpPC) |
template<> | |
IntegralAP< true > | ReadArg< IntegralAP< true > > (InterpState &S, CodePtr &OpPC) |
static unsigned | callArgSize (const InterpState &S, const CallExpr *C) |
template<typename T > | |
static T | getParam (const InterpFrame *Frame, unsigned Index) |
PrimType | getIntPrimType (const InterpState &S) |
PrimType | getLongPrimType (const InterpState &S) |
static APSInt | peekToAPSInt (InterpStack &Stk, PrimType T, size_t Offset=0) |
Peek an integer value from the stack into an APSInt. | |
static void | pushInteger (InterpState &S, const APSInt &Val, QualType QT) |
Pushes Val on the stack as the type given by QT . | |
template<typename T > | |
static void | pushInteger (InterpState &S, T Val, QualType QT) |
static void | assignInteger (Pointer &Dest, PrimType ValueT, const APSInt &Value) |
static bool | retPrimValue (InterpState &S, CodePtr OpPC, APValue &Result, std::optional< PrimType > &T) |
static bool | interp__builtin_is_constant_evaluated (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
static bool | interp__builtin_strcmp (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
static bool | interp__builtin_strlen (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const CallExpr *Call) |
static bool | interp__builtin_nan (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, bool Signaling) |
static bool | interp__builtin_inf (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F) |
static bool | interp__builtin_copysign (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F) |
static bool | interp__builtin_fmin (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F) |
static bool | interp__builtin_fmax (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func) |
static bool | interp__builtin_isnan (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, const CallExpr *Call) |
Defined as __builtin_isnan(...), to accommodate the fact that it can take a float, double, long double, etc. | |
static bool | interp__builtin_issignaling (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, const CallExpr *Call) |
static bool | interp__builtin_isinf (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, bool CheckSign, const CallExpr *Call) |
static bool | interp__builtin_isfinite (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, const CallExpr *Call) |
static bool | interp__builtin_isnormal (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, const CallExpr *Call) |
static bool | interp__builtin_issubnormal (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, const CallExpr *Call) |
static bool | interp__builtin_iszero (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *F, const CallExpr *Call) |
static bool | interp__builtin_isfpclass (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
First parameter to __builtin_isfpclass is the floating value, the second one is an integral value. | |
static bool | interp__builtin_fpclassify (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
Five int values followed by one floating value. | |
static bool | interp__builtin_fabs (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func) |
static bool | interp__builtin_popcount (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
static bool | interp__builtin_parity (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
static bool | interp__builtin_clrsb (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
static bool | interp__builtin_bitreverse (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
static bool | interp__builtin_classify_type (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
static bool | interp__builtin_expect (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
static bool | interp__builtin_rotate (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call, bool Right) |
rotateleft(value, amount) | |
static bool | interp__builtin_ffs (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
static bool | interp__builtin_addressof (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
static bool | interp__builtin_move (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
static bool | interp__builtin_eh_return_data_regno (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
static bool | noopPointer (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
Just takes the first Argument to the call and puts it on the stack. | |
static bool | interp__builtin_overflowop (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
static bool | interp__builtin_carryop (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
Three integral values followed by a pointer (lhs, rhs, carry, carryOut). | |
static bool | interp__builtin_clz (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
static bool | interp__builtin_ctz (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
static bool | interp__builtin_bswap (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
static bool | interp__builtin_atomic_lock_free (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
bool __atomic_always_lock_free(size_t, void const volatile*) bool __atomic_is_lock_free(size_t, void const volatile*) bool __c11_atomic_is_lock_free(size_t) | |
static bool | interp__builtin_complex (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
__builtin_complex(Float A, float B); | |
static bool | interp__builtin_is_aligned_up_down (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
__builtin_is_aligned() __builtin_align_up() __builtin_align_down() The first parameter is either an integer or a pointer. | |
static bool | interp__builtin_os_log_format_buffer_size (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
static bool | interp__builtin_ptrauth_string_discriminator (InterpState &S, CodePtr OpPC, const InterpFrame *Frame, const Function *Func, const CallExpr *Call) |
llvm::BitVector | collectNonNullArgs (const FunctionDecl *F, const llvm::ArrayRef< const Expr * > &Args) |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, MemberPointer FP) |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, const Pointer &P) |
template<typename T > | |
ComparisonCategoryResult | Compare (const T &X, const T &Y) |
Helper to compare two comparable types. | |
size_t | primSize (PrimType Type) |
Returns the size of a primitive type in bytes. | |
constexpr bool | isPtrType (PrimType T) |
llvm::raw_ostream & | operator<< (llvm::raw_ostream &OS, interp::CastKind CK) |
constexpr bool | isIntegralType (PrimType T) |
constexpr size_t | align (size_t Size) |
Aligns a size to the pointer alignment. | |
constexpr bool | aligned (uintptr_t Value) |
static bool | aligned (const void *P) |
using clang::interp::APFloat = typedef llvm::APFloat |
Definition at line 23 of file Floating.h.
typedef llvm::APInt clang::interp::APInt |
Definition at line 29 of file Integral.h.
typedef llvm::APSInt clang::interp::APSInt |
Definition at line 24 of file Floating.h.
using clang::interp::BlockCtorFn = typedef void (*)(Block *Storage, std::byte *FieldPtr, bool IsConst, bool IsMutable, bool IsActive, const Descriptor *FieldDesc) |
Invoked whenever a block is created.
The constructor method fills in the inline descriptors of all fields and array elements. It also initializes all the fields which contain non-trivial types.
Definition at line 34 of file Descriptor.h.
using clang::interp::BlockDtorFn = typedef void (*)(Block *Storage, std::byte *FieldPtr, const Descriptor *FieldDesc) |
Invoked when a block is destroyed.
Invokes the destructors of all non-trivial nested fields of arrays and records.
Definition at line 40 of file Descriptor.h.
using clang::interp::BlockMoveFn = typedef void (*)(Block *Storage, const std::byte *SrcFieldPtr, std::byte *DstFieldPtr, const Descriptor *FieldDesc) |
Invoked when a block with pointers referencing it goes out of scope.
Such blocks are persisted: the move function copies all inline descriptors and non-trivial fields, as existing pointers might need to reference those descriptors. Data is not copied since it cannot be legally read.
Definition at line 47 of file Descriptor.h.
using clang::interp::CompareFn = typedef llvm::function_ref<bool(ComparisonCategoryResult)> |
using clang::interp::DeclTy = typedef llvm::PointerUnion<const Decl *, const Expr *> |
Definition at line 28 of file Descriptor.h.
using clang::interp::InitMapPtr = typedef std::optional<std::pair<bool, std::shared_ptr<InitMap> >> |
Definition at line 29 of file Descriptor.h.
using clang::interp::SourceMap = typedef std::vector<std::pair<unsigned, SourceInfo> > |
|
strong |
|
strong |
Enumerator | |
---|---|
Reinterpret | |
Atomic |
Definition at line 55 of file PrimType.h.
|
strong |
Enumerator | |
---|---|
Initialized | |
NoInitializer | |
InitializerFailed |
Definition at line 51 of file Descriptor.h.
|
strong |
enum clang::interp::Opcode : uint32_t |
enum clang::interp::PrimType : unsigned |
Enumeration of the primitive types of the VM.
Enumerator | |
---|---|
PT_Sint8 | |
PT_Uint8 | |
PT_Sint16 | |
PT_Uint16 | |
PT_Sint32 | |
PT_Uint32 | |
PT_Sint64 | |
PT_Uint64 | |
PT_IntAP | |
PT_IntAPS | |
PT_Bool | |
PT_Float | |
PT_Ptr | |
PT_FnPtr | |
PT_MemberPtr |
Definition at line 33 of file PrimType.h.
|
strong |
|
strong |
|
strong |
bool clang::interp::Add | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
|
inline |
Definition at line 378 of file Interp.h.
References clang::interp::Floating::add(), CheckFloatResult(), and clang::Result.
bool clang::interp::AddOffset | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
bool clang::interp::AddSubMulHelper | ( | InterpState & | S, |
CodePtr | OpPC, | ||
unsigned | Bits, | ||
const T & | LHS, | ||
const T & | RHS | ||
) |
Definition at line 332 of file Interp.h.
References E, clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), Loc, clang::Result, clang::T, and toString().
Aligns a size to the pointer alignment.
Definition at line 104 of file PrimType.h.
Referenced by aligned(), callArgSize(), CallPtr(), CheckNonNullArgs(), clang::interp::ByteCodeEmitter::compileFunc(), clang::interp::ByteCodeEmitter::createLocal(), clang::interp::InterpFrame::describe(), clang::interp::InterpStack::dump(), emit(), clang::interp::ByteCodeEmitter::emitLabel(), emitSerialized(), clang::interp::Program::getOrCreateRecord(), clang::interp::Function::getWrittenArgSize(), interp__builtin_atomic_lock_free(), interp__builtin_carryop(), interp__builtin_complex(), interp__builtin_expect(), interp__builtin_fpclassify(), interp__builtin_isfpclass(), interp__builtin_overflowop(), interp__builtin_rotate(), peekToAPSInt(), clang::interp::CodePtr::read(), ReadArg< Floating >(), ReadArg< Floating >(), clang::interp::Compiler< Emitter >::VisitCallExpr(), clang::interp::Compiler< Emitter >::VisitCXXConstructExpr(), and clang::interp::Compiler< Emitter >::VisitCXXInheritedCtorInitExpr().
|
inlinestatic |
Definition at line 111 of file PrimType.h.
Definition at line 108 of file PrimType.h.
References align().
Referenced by aligned(), emit(), clang::interp::ByteCodeEmitter::emitLabel(), emitSerialized(), clang::interp::InterpStack::peek(), and clang::interp::CodePtr::read().
|
inline |
Definition at line 2850 of file Interp.h.
References CheckDynamicMemoryAllocation().
Referenced by clang::interp::DynamicAllocator::cleanup().
|
inline |
Definition at line 2891 of file Interp.h.
References CheckArraySize(), CheckDynamicMemoryAllocation(), and clang::interp::Descriptor::getSize().
|
inline |
Definition at line 2866 of file Interp.h.
References CheckArraySize(), CheckDynamicMemoryAllocation(), primSize(), and clang::T.
|
inline |
Just takes a pointer and checks if it's an incomplete array type.
Definition at line 2456 of file Interp.h.
References clang::interp::Pointer::atIndex(), CheckRange(), clang::CSK_ArrayToPointer, E, clang::interp::Pointer::isDummy(), clang::interp::Pointer::isRoot(), clang::interp::Pointer::isUnknownSizeArray(), and clang::interp::Pointer::isZero().
|
inline |
Definition at line 2415 of file Interp.h.
References clang::interp::Pointer::atIndex(), CheckLoad(), clang::interp::Pointer::deref(), and clang::T.
|
inline |
Definition at line 2426 of file Interp.h.
References clang::interp::Pointer::atIndex(), CheckLoad(), clang::interp::Pointer::deref(), and clang::T.
|
inline |
Definition at line 2383 of file Interp.h.
References CheckArray(), NarrowPtr(), and clang::T.
|
inline |
Definition at line 2399 of file Interp.h.
References CheckArray(), NarrowPtr(), and clang::T.
|
static |
Definition at line 102 of file InterpBuiltin.cpp.
References clang::interp::Pointer::deref(), INT_TYPE_SWITCH_NO_BOOL, and clang::T.
Referenced by interp__builtin_carryop(), and interp__builtin_overflowop().
|
inline |
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 555 of file Interp.h.
References clang::Result, and clang::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 572 of file Interp.h.
References clang::Result, and clang::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 589 of file Interp.h.
References clang::Result, and clang::T.
|
inline |
Definition at line 2528 of file Interp.h.
References CheckCallable(), CheckCallDepth(), CheckInvoke(), clang::Func, Interpret(), primSize(), and PT_Ptr.
|
static |
Definition at line 21 of file InterpBuiltin.cpp.
References align(), clang::C, E, and primSize().
Referenced by interp__builtin_clz(), interp__builtin_ctz(), and interp__builtin_is_aligned_up_down().
|
inline |
Definition at line 2620 of file Interp.h.
References clang::Func, and InterpretBuiltin().
|
inline |
Definition at line 2635 of file Interp.h.
References align(), clang::Call, CallVirt(), CheckNonNullArgs(), E, clang::interp::FunctionPointer::getFunction(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::interp::FunctionPointer::isValid(), primSize(), and PT_Ptr.
|
inline |
Definition at line 2478 of file Interp.h.
References CheckCallable(), CheckCallDepth(), CheckInvoke(), clang::Func, Interpret(), primSize(), and PT_Ptr.
|
inline |
Definition at line 2577 of file Interp.h.
References clang::Call, E, clang::Func, clang::Sema::getLangOpts(), clang::Stmt::getSourceRange(), clang::CXXMethodDecl::isVirtual(), primSize(), and PT_Ptr.
Referenced by CallPtr().
bool clang::interp::Cast | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
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 2033 of file Interp.h.
References clang::interp::IntegralAP< Signed >::from(), and clang::T.
bool clang::interp::CastAPS | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | BitWidth | ||
) |
Definition at line 2040 of file Interp.h.
References clang::interp::IntegralAP< Signed >::from(), and clang::T.
bool clang::interp::CastFloatingIntegral | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 2061 of file Interp.h.
References CheckFloatResult(), clang::interp::Floating::convertToInteger(), E, clang::interp::Floating::getAPFloat(), clang::Expr::getType(), clang::interp::Floating::isNonZero(), clang::Result, and clang::T.
|
inlinestatic |
Definition at line 2090 of file Interp.h.
References CheckFloatResult(), clang::interp::Floating::convertToInteger(), E, clang::interp::Floating::getAPFloat(), clang::Expr::getType(), clang::interp::Floating::isFinite(), and clang::Result.
|
inlinestatic |
Definition at line 2110 of file Interp.h.
References CheckFloatResult(), clang::interp::Floating::convertToInteger(), E, clang::interp::Floating::getAPFloat(), clang::Expr::getType(), clang::interp::Floating::isFinite(), and clang::Result.
|
inline |
1) Pops a Floating from the stack.
2) Pushes a new floating on the stack that uses the given semantics.
Definition at line 2022 of file Interp.h.
References clang::Result, and clang::interp::Floating::toSemantics().
bool clang::interp::CastIntegralFloating | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const llvm::fltSemantics * | Sem, | ||
llvm::RoundingMode | RM | ||
) |
Definition at line 2047 of file Interp.h.
References CheckFloatResult(), clang::interp::Floating::fromIntegral(), clang::Result, and clang::T.
|
inline |
bool clang::interp::CastPointerIntegral | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 2131 of file Interp.h.
References E, clang::interp::Pointer::getIntegerRepresentation(), clang::Sema::getLangOpts(), clang::interp::Pointer::isDummy(), and clang::T.
|
inlinestatic |
Definition at line 2145 of file Interp.h.
References E, clang::interp::IntegralAP< Signed >::from(), clang::interp::Pointer::getIntegerRepresentation(), clang::Sema::getLangOpts(), and clang::interp::Pointer::isDummy().
|
inlinestatic |
Definition at line 2161 of file Interp.h.
References E, clang::interp::IntegralAP< Signed >::from(), clang::interp::Pointer::getIntegerRepresentation(), clang::Sema::getLangOpts(), and clang::interp::Pointer::isDummy().
bool clang::interp::CheckArray | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr | ||
) |
Checks if the array is offsetable.
Definition at line 264 of file Interp.cpp.
References E, and clang::interp::Pointer::isUnknownSizeArray().
Referenced by ArrayElemPtr(), ArrayElemPtrPop(), GetPtrField(), GetPtrFieldPop(), interp__builtin_strlen(), and OffsetHelper().
|
static |
Definition at line 65 of file EvaluationResult.cpp.
References clang::interp::Pointer::atIndex(), CheckArrayInitialized(), CheckFieldsInitialized(), DiagnoseUninitializedSubobject(), clang::ArrayType::getElementType(), clang::interp::Pointer::getElemRecord(), clang::interp::Pointer::getField(), clang::ConstantArrayType::getZExtSize(), clang::interp::Pointer::isInitialized(), clang::Type::isRecordType(), Loc, clang::interp::Pointer::narrow(), and clang::Result.
Referenced by CheckArrayInitialized(), CheckFieldsInitialized(), and clang::interp::EvaluationResult::checkFullyInitialized().
bool clang::interp::CheckArraySize | ( | InterpState & | S, |
CodePtr | OpPC, | ||
SizeT * | NumElements, | ||
unsigned | ElemSize, | ||
bool | IsNoThrow | ||
) |
Definition at line 222 of file Interp.h.
References clang::ConstantArrayType::getMaxSizeBits(), Loc, and clang::interp::Descriptor::MaxArrayElemBytes.
bool clang::interp::CheckCallable | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Function * | F | ||
) |
Checks if a method can be called.
Definition at line 576 of file Interp.cpp.
References bool, clang::interp::Function::getDecl(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), clang::FunctionDecl::getStorageClass(), clang::Decl::hasAttr(), clang::interp::Function::hasBody(), clang::FunctionDecl::hasBody(), clang::FunctionDecl::isConstexpr(), clang::interp::Function::isConstexpr(), clang::FunctionDecl::isDefined(), clang::Decl::isInvalidDecl(), clang::interp::Function::isLambdaStaticInvoker(), clang::interp::Function::isVirtual(), Loc, and clang::SC_Extern.
bool clang::interp::CheckCallDepth | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Checks if calling the currently active function would exceed the allowed call depth.
Definition at line 642 of file Interp.cpp.
References clang::Sema::getLangOpts().
bool clang::interp::CheckConst | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr | ||
) |
Checks if a pointer points to const storage.
Definition at line 404 of file Interp.cpp.
References clang::interp::Pointer::block(), clang::Func, clang::interp::Pointer::getType(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isConst(), clang::interp::Pointer::isLive(), clang::interp::Pointer::isMutable(), and Loc.
Referenced by CheckStore().
bool clang::interp::CheckConstant | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Descriptor * | Desc | ||
) |
Checks if the Descriptor is of a constexpr or const global variable.
Definition at line 302 of file Interp.cpp.
References clang::interp::Descriptor::asVarDecl(), D, diagnoseNonConstVariable(), clang::Type::getAs(), clang::Sema::getLangOpts(), clang::Type::getPointeeType(), clang::QualType::isConstQualified(), clang::Type::isSignedIntegerOrEnumerationType(), clang::Type::isUnsignedIntegerOrEnumerationType(), and clang::T.
Referenced by CheckConstant(), CheckLoad(), and GetGlobal().
|
static |
Definition at line 336 of file Interp.cpp.
References CheckConstant(), clang::interp::Pointer::getDeclDesc(), and clang::interp::Pointer::isBlockPointer().
|
inline |
Definition at line 2831 of file Interp.h.
References clang::Decl::getLocation(), clang::VarDecl::getTSCSpec(), clang::VarDecl::isLocalVarDecl(), clang::VarDecl::isStaticLocal(), clang::VarDecl::isUsableInConstantExpressions(), and clang::TSCS_unspecified.
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 781 of file Interp.cpp.
References D, diagnoseUnknownDecl(), and clang::DeclRefExpr::getDecl().
Referenced by InvalidDeclRef().
bool clang::interp::CheckDeleteSource | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Expr * | Source, | ||
const Pointer & | Ptr | ||
) |
Check the source of the pointer passed to delete/delete[] has actually been heap allocated by us.
Definition at line 762 of file Interp.cpp.
References clang::interp::Pointer::getDeclLoc(), clang::interp::Pointer::isTemporary(), Loc, and clang::interp::Pointer::toDiagnosticString().
Referenced by Free().
bool clang::interp::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.
Definition at line 384 of file Interp.cpp.
References E, clang::interp::Pointer::getByteOffset(), clang::interp::Pointer::getDeclDesc(), clang::interp::Pointer::getDeclPtr(), clang::interp::Descriptor::getMetadataSize(), clang::Type::getPointeeType(), clang::Expr::getType(), and clang::interp::Pointer::getType().
Referenced by GetPtrDerivedPop().
bool clang::interp::CheckDummy | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr, | ||
AccessKinds | AK | ||
) |
Checks if a pointer is a dummy pointer.
Definition at line 786 of file Interp.cpp.
References clang::AK_Assign, clang::AK_Decrement, clang::AK_Increment, clang::AK_Read, clang::interp::Descriptor::asValueDecl(), D, diagnoseUnknownDecl(), E, clang::interp::Pointer::getDeclDesc(), clang::Sema::getLangOpts(), and clang::interp::Pointer::isDummy().
Referenced by CheckLoad(), CheckStore(), and interp__builtin_strlen().
bool clang::interp::CheckDynamicMemoryAllocation | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Checks if dynamic memory allocation is available in the current language mode.
Definition at line 727 of file Interp.cpp.
References E, and clang::Sema::getLangOpts().
|
inline |
Definition at line 2802 of file Interp.h.
References diagnoseEnumValue(), clang::EnumDecl::isFixed(), and clang::T.
bool clang::interp::CheckExtern | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr | ||
) |
Checks if the variable has externally defined storage.
Definition at line 249 of file Interp.cpp.
References clang::interp::Descriptor::asValueDecl(), clang::interp::Descriptor::asVarDecl(), diagnoseNonConstVariable(), clang::interp::Pointer::getDeclDesc(), clang::Sema::getLangOpts(), clang::interp::Pointer::isExtern(), and clang::interp::Pointer::isInitialized().
Referenced by CheckInvoke(), CheckLoad(), CheckStore(), GetPtrField(), and GetPtrFieldPop().
|
static |
Definition at line 95 of file EvaluationResult.cpp.
References clang::interp::Descriptor::asDecl(), clang::interp::Descriptor::asExpr(), clang::interp::Pointer::atField(), clang::interp::Record::bases(), CheckArrayInitialized(), CheckFieldsInitialized(), DiagnoseUninitializedSubobject(), clang::interp::Record::fields(), clang::Type::getAsArrayTypeUnsafe(), clang::interp::Pointer::getDeclDesc(), clang::Expr::getExprLoc(), clang::Decl::getLocation(), clang::interp::Pointer::getRecord(), clang::interp::Pointer::isActive(), clang::Type::isArrayType(), clang::Type::isIncompleteArrayType(), clang::interp::Pointer::isInitialized(), clang::Type::isRecordType(), clang::interp::Record::isUnion(), Loc, P, and clang::Result.
Referenced by CheckArrayInitialized(), CheckFieldsInitialized(), and clang::interp::EvaluationResult::checkFullyInitialized().
bool clang::interp::CheckFloatResult | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Floating & | Result, | ||
APFloat::opStatus | Status | ||
) |
Checks if the result of a floating-point operation is valid in the current context.
Definition at line 680 of file Interp.cpp.
References E, clang::LangOptionsBase::FPE_Ignore, clang::FPOptions::getExceptionMode(), clang::Expr::getFPFeaturesInEffect(), clang::Sema::getLangOpts(), clang::FPOptions::getRoundingMode(), and clang::Result.
Referenced by Addf(), CastFloatingIntegral(), CastFloatingIntegralAP(), CastFloatingIntegralAPS(), CastIntegralFloating(), Divf(), IncDecFloatHelper(), Mulf(), and Subf().
bool clang::interp::CheckGlobalInitialized | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr | ||
) |
Check if a global variable is initialized.
Definition at line 497 of file Interp.cpp.
References clang::interp::Descriptor::asValueDecl(), clang::interp::Pointer::getDeclDesc(), clang::Sema::getLangOpts(), clang::interp::Pointer::isInitialized(), and Loc.
Referenced by clang::interp::Context::evaluateAsInitializer(), and GetGlobal().
bool clang::interp::CheckInit | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr | ||
) |
Checks if a value can be initialized.
Definition at line 568 of file Interp.cpp.
References clang::AK_Assign, CheckLive(), and CheckRange().
Referenced by Init(), InitElem(), InitElemPop(), and InitPop().
bool clang::interp::CheckInitialized | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr, | ||
AccessKinds | AK | ||
) |
Definition at line 471 of file Interp.cpp.
References clang::interp::Descriptor::asVarDecl(), diagnoseMissingInitializer(), clang::interp::Pointer::getDeclDesc(), clang::VarDecl::hasGlobalStorage(), clang::interp::Pointer::isInitialized(), clang::interp::Pointer::isLive(), and Loc.
Referenced by CheckLoad(), DecPtr(), and IncPtr().
bool clang::interp::CheckInvoke | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr | ||
) |
Checks if a method can be invoked on an object.
Definition at line 556 of file Interp.cpp.
References clang::AK_MemberCall, CheckExtern(), CheckLive(), CheckRange(), and clang::interp::Pointer::isDummy().
bool clang::interp::CheckLive | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr, | ||
AccessKinds | AK | ||
) |
Checks if a pointer is live and accessible.
Definition at line 272 of file Interp.cpp.
References clang::CSK_Field, clang::interp::Pointer::getDeclLoc(), clang::interp::Pointer::isField(), clang::interp::Pointer::isLive(), clang::interp::Pointer::isTemporary(), and clang::interp::Pointer::isZero().
Referenced by CheckInit(), CheckInvoke(), CheckLoad(), CheckStore(), interp__builtin_strcmp(), and interp__builtin_strlen().
bool clang::interp::CheckLoad | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr, | ||
AccessKinds | AK | ||
) |
Checks if a value can be loaded from a block.
Definition at line 514 of file Interp.cpp.
References CheckActive(), CheckConstant(), CheckDummy(), CheckExtern(), CheckInitialized(), CheckLive(), CheckMutable(), CheckRange(), CheckTemporary(), and CheckVolatile().
Referenced by ArrayElem(), ArrayElemPop(), CopyArray(), Dec(), Decf(), DecfPop(), DecPop(), GetField(), GetFieldPop(), GetLocal(), GetThisField(), Inc(), Incf(), IncfPop(), IncPop(), interp__builtin_nan(), Load(), LoadPop(), and Memcpy().
bool clang::interp::CheckMutable | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr | ||
) |
Checks if a pointer points to a mutable field.
Definition at line 432 of file Interp.cpp.
References clang::AK_Read, clang::interp::Pointer::block(), clang::interp::Block::getEvalID(), clang::interp::Pointer::getField(), clang::Sema::getLangOpts(), clang::interp::Pointer::isLive(), clang::interp::Pointer::isMutable(), and Loc.
Referenced by CheckLoad().
bool clang::interp::CheckNewDeleteForms | ( | InterpState & | S, |
CodePtr | OpPC, | ||
bool | NewWasArray, | ||
bool | DeleteIsArray, | ||
const Descriptor * | D, | ||
const Expr * | NewExpr | ||
) |
Diagnose mismatched new[]/delete or new/delete[] pairs.
Definition at line 736 of file Interp.cpp.
References D, E, clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), and clang::Normal.
Referenced by Free().
|
inline |
bool clang::interp::CheckNonNullArgs | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Function * | F, | ||
const CallExpr * | CE, | ||
unsigned | ArgSize | ||
) |
Checks if all the arguments annotated as 'nonnull' are in fact not null.
Definition at line 807 of file Interp.cpp.
References align(), collectNonNullArgs(), clang::CallExpr::getArgs(), clang::interp::Function::getDecl(), clang::CallExpr::getNumArgs(), clang::interp::Pointer::isZero(), Loc, primSize(), and PT_Ptr.
Referenced by CallPtr().
bool clang::interp::CheckNull | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr, | ||
CheckSubobjectKind | CSK | ||
) |
Checks if a pointer is null.
Definition at line 342 of file Interp.cpp.
References clang::interp::Pointer::isZero(), and Loc.
Referenced by GetField(), GetFieldPop(), GetPtrActiveField(), GetPtrBase(), GetPtrBasePop(), GetPtrDerivedPop(), GetPtrField(), GetPtrFieldPop(), GetPtrVirtBasePop(), IncDecPtrHelper(), OffsetHelper(), and SetField().
bool clang::interp::CheckPure | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const CXXMethodDecl * | MD | ||
) |
Checks if a method is pure virtual.
Definition at line 671 of file Interp.cpp.
References E, clang::Decl::getLocation(), and clang::FunctionDecl::isPureVirtual().
bool clang::interp::CheckRange | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr, | ||
AccessKinds | AK | ||
) |
Checks if a pointer is in range.
Definition at line 353 of file Interp.cpp.
References clang::interp::Pointer::isOnePastEnd(), and Loc.
Referenced by ArrayDecay(), CheckInit(), CheckInvoke(), CheckLoad(), CheckStore(), GetField(), GetFieldPop(), GetPtrActiveField(), GetPtrField(), GetPtrFieldPop(), interp__builtin_strcmp(), interp__builtin_strlen(), and SetField().
bool clang::interp::CheckRange | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr, | ||
CheckSubobjectKind | CSK | ||
) |
Checks if a field from which a pointer is going to be derived is valid.
Definition at line 363 of file Interp.cpp.
References clang::interp::Pointer::isElementPastEnd(), and Loc.
bool clang::interp::CheckShift | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const LT & | LHS, | ||
const RT & | RHS, | ||
unsigned | Bits | ||
) |
Checks if the shift operation is legal.
Definition at line 151 of file Interp.h.
References E, clang::Sema::getLangOpts(), clang::Expr::getType(), and Loc.
Referenced by DoShift().
bool clang::interp::CheckStore | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr | ||
) |
Checks if a value can be stored in a block.
Definition at line 540 of file Interp.cpp.
References clang::AK_Assign, CheckConst(), CheckDummy(), CheckExtern(), CheckGlobal(), CheckLive(), and CheckRange().
Referenced by SetField(), SetThisField(), Store(), StoreBitField(), StoreBitFieldPop(), and StorePop().
bool clang::interp::CheckSubobject | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr, | ||
CheckSubobjectKind | CSK | ||
) |
Checks if Ptr is a one-past-the-end pointer.
Definition at line 373 of file Interp.cpp.
References clang::interp::Pointer::isOnePastEnd(), and Loc.
Referenced by GetPtrBase(), GetPtrBasePop(), GetPtrDerivedPop(), GetPtrField(), and GetPtrFieldPop().
bool clang::interp::CheckThis | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | This | ||
) |
Checks the 'this' pointer.
Definition at line 653 of file Interp.cpp.
References E, clang::Sema::getLangOpts(), Loc, and This().
Referenced by GetPtrActiveThisField(), GetPtrThisBase(), GetPtrThisField(), GetPtrThisVirtBase(), GetThisField(), InitThisBitField(), InitThisField(), InitThisFieldActive(), SetThisField(), and This().
bool clang::interp::CheckVolatile | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr, | ||
AccessKinds | AK | ||
) |
Definition at line 450 of file Interp.cpp.
References clang::Sema::getLangOpts(), clang::interp::Pointer::getType(), clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isLive(), clang::QualType::isVolatileQualified(), and Loc.
Referenced by CheckLoad().
void clang::interp::cleanupAfterFunctionCall | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 198 of file Interp.cpp.
References clang::interp::Function::getNumWrittenParams(), clang::interp::Function::isBuiltin(), clang::interp::Function::isUnevaluatedBuiltin(), clang::interp::Function::isVariadic(), and popArg().
bool clang::interp::CMP3 | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const ComparisonCategoryInfo * | CmpInfo | ||
) |
Definition at line 1071 of file Interp.h.
References clang::interp::Pointer::compare(), clang::ComparisonCategoryInfo::getValueInfo(), Loc, clang::ComparisonCategoryInfo::makeWeakResult(), P, SetThreeWayComparisonField(), clang::T, and clang::Unordered.
bool clang::interp::CmpHelper | ( | InterpState & | S, |
CodePtr | OpPC, | ||
CompareFn | Fn | ||
) |
|
inline |
Function pointers cannot be compared in an ordered way.
Definition at line 912 of file Interp.h.
References Loc, and clang::interp::FunctionPointer::toDiagnosticString().
|
inline |
Definition at line 945 of file Interp.h.
References Compare(), Fn, clang::interp::Pointer::getByteOffset(), clang::interp::Pointer::hasSameBase(), Loc, and clang::interp::Pointer::toDiagnosticString().
bool clang::interp::CmpHelperEQ | ( | InterpState & | S, |
CodePtr | OpPC, | ||
CompareFn | Fn | ||
) |
|
inline |
Definition at line 925 of file Interp.h.
References clang::interp::FunctionPointer::compare(), Fn, clang::interp::Boolean::from(), and Loc.
|
inline |
Definition at line 1023 of file Interp.h.
References clang::interp::MemberPointer::compare(), clang::Equal, Fn, clang::interp::Boolean::from(), clang::CXXMethodDecl::isVirtual(), clang::ValueDecl::isWeak(), clang::interp::MemberPointer::isZero(), Loc, and clang::Unordered.
|
inline |
Definition at line 965 of file Interp.h.
References clang::interp::Pointer::atIndex(), Compare(), clang::Equal, Fn, clang::interp::Pointer::getByteOffset(), clang::interp::Pointer::getOffset(), clang::interp::Pointer::hasSameBase(), clang::interp::Pointer::isArrayRoot(), clang::interp::Pointer::isOnePastEnd(), clang::interp::Pointer::isZero(), Loc, P, clang::interp::Pointer::toDiagnosticString(), and clang::Unordered.
|
static |
Definition at line 177 of file EvaluationResult.cpp.
References clang::interp::Pointer::atField(), clang::interp::Pointer::atIndex(), clang::interp::Pointer::block(), collectBlocks(), clang::interp::Pointer::deref(), clang::interp::Descriptor::ElemRecord, clang::interp::Pointer::getFieldDesc(), clang::interp::Descriptor::getNumElems(), clang::interp::Descriptor::getPrimType(), clang::interp::Descriptor::isCompositeArray(), clang::interp::Descriptor::isPrimitive(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::Pointer::narrow(), P, and PT_Ptr.
Referenced by clang::interp::EvaluationResult::checkReturnValue(), and collectBlocks().
llvm::BitVector clang::interp::collectNonNullArgs | ( | const FunctionDecl * | F, |
const llvm::ArrayRef< const Expr * > & | Args | ||
) |
Definition at line 16 of file InterpShared.cpp.
References clang::Decl::specific_attrs().
Referenced by CheckNonNullArgs(), and clang::interp::Compiler< Emitter >::VisitCallExpr().
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 876 of file Interp.h.
References clang::Result, and clang::T.
ComparisonCategoryResult clang::interp::Compare | ( | const T & | X, |
const T & | Y | ||
) |
Helper to compare two comparable types.
Definition at line 25 of file Primitives.h.
References clang::Equal, clang::Greater, clang::Less, and X.
Referenced by CmpHelper< Pointer >(), CmpHelperEQ< Pointer >(), clang::interp::Boolean::compare(), clang::interp::Integral< Bits, Signed >::compare(), and Divc().
bool clang::interp::Const | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const T & | Arg | ||
) |
|
inline |
Definition at line 2437 of file Interp.h.
References clang::interp::Pointer::atIndex(), CheckLoad(), clang::interp::Pointer::deref(), clang::interp::Pointer::initialize(), and clang::T.
bool clang::interp::Dec | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value decreased by one back to the pointer 4) Pushes the original (pre-dec) value on the stack.
Definition at line 801 of file Interp.h.
References clang::AK_Decrement, and CheckLoad().
|
inline |
|
inline |
Definition at line 857 of file Interp.h.
References clang::AK_Decrement, and CheckLoad().
|
inline |
Definition at line 865 of file Interp.h.
References clang::AK_Decrement, and CheckLoad().
bool clang::interp::DecPop | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value decreased by one back to the pointer
Definition at line 813 of file Interp.h.
References clang::AK_Decrement, and CheckLoad().
|
inlinestatic |
Definition at line 1961 of file Interp.h.
References clang::AK_Decrement, and CheckInitialized().
|
inline |
void clang::interp::diagnoseEnumValue | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const EnumDecl * | ED, | ||
const APSInt & | Value | ||
) |
Definition at line 904 of file Interp.cpp.
References clang::EnumDecl::getNumNegativeBits(), clang::EnumDecl::getValueRange(), Loc, clang::Max, and clang::Min.
Referenced by CheckEnumValue().
|
static |
Definition at line 53 of file EvaluationResult.cpp.
References clang::Decl::getLocation(), and Loc.
Referenced by CheckArrayInitialized(), and CheckFieldsInitialized().
bool clang::interp::Div | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
1) Pops the RHS from the stack.
2) Pops the LHS from the stack. 3) Pushes 'LHS / RHS' on the stack
Definition at line 626 of file Interp.h.
References CheckDivRem(), clang::Result, and clang::T.
|
inline |
Definition at line 480 of file Interp.h.
References clang::interp::Pointer::atIndex(), clang::C, Compare(), D, clang::interp::Pointer::deref(), E, clang::Equal, HandleComplexComplexDiv(), clang::Result, clang::T, and Zero().
|
inline |
Definition at line 642 of file Interp.h.
References CheckDivRem(), CheckFloatResult(), clang::interp::Floating::div(), and clang::Result.
bool clang::interp::DoMemcpy | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Src, | ||
Pointer & | Dest | ||
) |
Copy the contents of Src into Dest.
Definition at line 1561 of file InterpBuiltin.cpp.
References clang::interp::Pointer::atField(), clang::interp::Pointer::atIndex(), clang::interp::Pointer::deref(), clang::interp::Descriptor::ElemRecord, clang::interp::Record::fields(), clang::interp::Pointer::getFieldDesc(), clang::interp::Descriptor::getNumElems(), clang::interp::Descriptor::getPrimType(), clang::interp::Pointer::initialize(), clang::Invalid, clang::interp::Pointer::isLive(), clang::interp::Descriptor::isPrimitive(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::Descriptor::isRecord(), clang::T, and TYPE_SWITCH.
Referenced by Memcpy().
|
inline |
Definition at line 2267 of file Interp.h.
References CheckShift(), DoShift(), clang::Sema::getLangOpts(), Left, Loc, LT, and Right.
Referenced by DoShift().
|
inline |
bool clang::interp::Dup | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
bool clang::interp::EQ | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1064 of file Interp.h.
References clang::Equal.
|
inline |
|
inline |
Definition at line 2368 of file Interp.h.
References clang::interp::Pointer::expand().
|
inline |
Definition at line 1613 of file Interp.h.
References clang::interp::Pointer::activate(), clang::interp::Pointer::canBeInitialized(), and clang::interp::Pointer::initialize().
|
inline |
Definition at line 1604 of file Interp.h.
References clang::interp::Pointer::activate(), clang::interp::Pointer::canBeInitialized(), and clang::interp::Pointer::initialize().
|
inlinestatic |
Definition at line 2918 of file Interp.h.
References clang::interp::Descriptor::asExpr(), clang::interp::Pointer::block(), CheckDeleteSource(), CheckDynamicMemoryAllocation(), CheckNewDeleteForms(), clang::interp::Pointer::getDeclDesc(), clang::interp::Block::getDescriptor(), clang::interp::Pointer::isArrayElement(), clang::interp::Pointer::isOnePastEnd(), clang::interp::Pointer::isRoot(), clang::interp::Pointer::isZero(), Loc, RunDestructors(), and clang::interp::Pointer::toDiagnosticString().
bool clang::interp::GE | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1124 of file Interp.h.
References clang::Equal, and clang::Greater.
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 1211 of file Interp.h.
References clang::interp::Pointer::atField(), CheckLoad(), CheckNull(), CheckRange(), clang::CSK_Field, and clang::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 1243 of file Interp.h.
References clang::interp::Pointer::atField(), CheckLoad(), CheckNull(), CheckRange(), clang::CSK_Field, and clang::T.
|
inline |
Definition at line 2678 of file Interp.h.
References clang::Func.
bool clang::interp::GetGlobal | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
Definition at line 1286 of file Interp.h.
References CheckConstant(), CheckGlobalInitialized(), clang::interp::Pointer::deref(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::isExtern(), and clang::T.
bool clang::interp::GetGlobalUnchecked | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
Same as GetGlobal, but without the checks.
Definition at line 1304 of file Interp.h.
References clang::interp::Pointer::deref(), clang::interp::Pointer::isInitialized(), and clang::T.
PrimType clang::interp::getIntPrimType | ( | const InterpState & | S | ) |
Definition at line 38 of file InterpBuiltin.cpp.
References clang::TargetInfo::getIntWidth(), PT_Sint16, and PT_Sint32.
Referenced by interp__builtin_fpclassify().
|
inline |
bool clang::interp::GetLocal | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
Definition at line 1176 of file Interp.h.
References CheckLoad(), clang::interp::Pointer::deref(), and clang::T.
PrimType clang::interp::getLongPrimType | ( | const InterpState & | S | ) |
Definition at line 49 of file InterpBuiltin.cpp.
References clang::TargetInfo::getLongWidth(), PT_Sint16, PT_Sint32, and PT_Sint64.
Referenced by interp__builtin_expect().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 2704 of file Interp.h.
References clang::Func.
|
static |
Definition at line 32 of file InterpBuiltin.cpp.
References clang::T.
bool clang::interp::GetParam | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
|
inline |
Definition at line 1529 of file Interp.h.
References clang::interp::Pointer::atField(), CheckNull(), CheckRange(), clang::CSK_Field, and clang::interp::Pointer::deactivate().
|
inline |
Definition at line 1542 of file Interp.h.
References CheckThis(), and This().
|
inline |
Definition at line 1568 of file Interp.h.
References clang::interp::Pointer::atField(), CheckNull(), CheckSubobject(), and clang::CSK_Base.
|
inline |
Definition at line 1578 of file Interp.h.
References clang::interp::Pointer::atField(), CheckNull(), CheckSubobject(), and clang::CSK_Base.
|
inline |
Definition at line 1555 of file Interp.h.
References clang::interp::Pointer::atFieldSub(), CheckDowncast(), CheckNull(), CheckSubobject(), and clang::CSK_Derived.
|
inline |
1) Peeks a Pointer 2) Pushes Pointer.atField(Off) on the stack
Definition at line 1474 of file Interp.h.
References clang::interp::Pointer::atField(), clang::interp::Pointer::block(), CheckArray(), CheckExtern(), CheckNull(), CheckRange(), CheckSubobject(), clang::CSK_Field, clang::Sema::getLangOpts(), clang::interp::Block::getSize(), and clang::interp::Pointer::isBlockPointer().
|
inline |
Definition at line 1496 of file Interp.h.
References clang::interp::Pointer::atField(), clang::interp::Pointer::block(), CheckArray(), CheckExtern(), CheckNull(), CheckRange(), CheckSubobject(), clang::CSK_Field, clang::Sema::getLangOpts(), clang::interp::Block::getSize(), and clang::interp::Pointer::isBlockPointer().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 1594 of file Interp.h.
References CheckThis(), and This().
|
inline |
Definition at line 1519 of file Interp.h.
References CheckThis(), and This().
|
inline |
Definition at line 1647 of file Interp.h.
References CheckThis(), D, This(), and VirtBaseHelper().
|
inline |
Definition at line 1638 of file Interp.h.
References CheckNull(), clang::CSK_Base, D, and VirtBaseHelper().
Definition at line 19 of file Floating.cpp.
IntegralAP< Signed > clang::interp::getSwappedBytes | ( | IntegralAP< Signed > | F | ) |
Definition at line 321 of file IntegralAP.h.
bool clang::interp::GetThisField | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
Definition at line 1257 of file Interp.h.
References CheckLoad(), CheckThis(), clang::T, and This().
bool clang::interp::GT | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1117 of file Interp.h.
References clang::Greater.
bool clang::interp::Inc | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value increased by one back to the pointer 4) Pushes the original (pre-inc) value on the stack.
Definition at line 776 of file Interp.h.
References clang::AK_Increment, and CheckLoad().
bool clang::interp::IncDecFloatHelper | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr, | ||
llvm::RoundingMode | RM | ||
) |
Definition at line 822 of file Interp.h.
References CheckFloatResult(), clang::interp::Floating::decrement(), clang::interp::Pointer::deref(), Inc, clang::interp::Floating::increment(), clang::Result, and Yes.
bool clang::interp::IncDecHelper | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Pointer & | Ptr | ||
) |
Definition at line 718 of file Interp.h.
References clang::interp::Pointer::deref(), E, clang::Expr::getExprLoc(), clang::Sema::getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::getType(), Inc, clang::Invalid, clang::interp::Pointer::isDummy(), Loc, clang::Result, clang::T, toString(), and Yes.
|
inlinestatic |
Definition at line 1928 of file Interp.h.
References CheckNull(), clang::CSK_ArrayIndex, clang::interp::Pointer::deref(), clang::interp::Pointer::isDummy(), and P.
|
inline |
Definition at line 841 of file Interp.h.
References clang::AK_Increment, and CheckLoad().
|
inline |
Definition at line 849 of file Interp.h.
References clang::AK_Increment, and CheckLoad().
bool clang::interp::IncPop | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
1) Pops a pointer from the stack 2) Load the value from the pointer 3) Writes the value increased by one back to the pointer
Definition at line 788 of file Interp.h.
References clang::AK_Increment, and CheckLoad().
|
inlinestatic |
Definition at line 1952 of file Interp.h.
References clang::AK_Increment, and CheckInitialized().
bool clang::interp::Init | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1739 of file Interp.h.
References CheckInit(), and clang::T.
bool clang::interp::InitBitField | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Record::Field * | F | ||
) |
bool clang::interp::InitElem | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | Idx | ||
) |
1) Pops the value from the stack 2) Peeks a pointer and gets its index \Idx 3) Sets the value on the pointer, leaving the pointer on the stack.
Definition at line 1766 of file Interp.h.
References CheckInit(), and clang::T.
bool clang::interp::InitElemPop | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | Idx | ||
) |
The same as InitElem, but pops the pointer as well.
Definition at line 1780 of file Interp.h.
References CheckInit(), and clang::T.
bool clang::interp::InitField | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
bool clang::interp::InitFieldActive | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
bool clang::interp::InitGlobal | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
bool clang::interp::InitGlobalTemp | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I, | ||
const LifetimeExtendedTemporaryDecl * | Temp | ||
) |
1) Converts the value on top of the stack to an APValue 2) Sets that APValue on \Temp 3) Initializes global with index \I with that
Definition at line 1330 of file Interp.h.
References clang::interp::Descriptor::asExpr(), clang::interp::Pointer::deref(), clang::interp::Pointer::getDeclDesc(), clang::LifetimeExtendedTemporaryDecl::getOrCreateValue(), clang::interp::Pointer::initialize(), and clang::T.
|
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 1352 of file Interp.h.
References clang::LifetimeExtendedTemporaryDecl::getOrCreateValue(), clang::LifetimeExtendedTemporaryDecl::getTemporaryExpr(), clang::Expr::getType(), and P.
bool clang::interp::InitPop | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1752 of file Interp.h.
References CheckInit(), clang::interp::Pointer::initialize(), and clang::T.
bool clang::interp::InitThisBitField | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Record::Field * | F, | ||
uint32_t | FieldOffset | ||
) |
Definition at line 1386 of file Interp.h.
References CheckThis(), clang::T, and This().
bool clang::interp::InitThisField | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
Definition at line 1371 of file Interp.h.
References CheckThis(), clang::T, and This().
bool clang::interp::InitThisFieldActive | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
Definition at line 1402 of file Interp.h.
References CheckThis(), clang::T, and This().
bool clang::interp::InRange | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
|
static |
Definition at line 608 of file InterpBuiltin.cpp.
References clang::Call, PT_FnPtr, and PT_Ptr.
Referenced by InterpretBuiltin().
|
static |
bool __atomic_always_lock_free(size_t, void const volatile*) bool __atomic_is_lock_free(size_t, void const volatile*) bool __c11_atomic_is_lock_free(size_t)
Definition at line 899 of file InterpBuiltin.cpp.
References align(), clang::Call, clang::CharUnits::fromQuantity(), clang::Func, clang::Type::getAs(), clang::interp::Pointer::getIntegerRepresentation(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::Type::isIncompleteType(), clang::interp::Pointer::isIntegralPointer(), clang::interp::Pointer::isZero(), clang::CharUnits::One(), peekToAPSInt(), primSize(), and PT_Ptr.
Referenced by InterpretBuiltin().
|
static |
Definition at line 528 of file InterpBuiltin.cpp.
References clang::Call, peekToAPSInt(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 883 of file InterpBuiltin.cpp.
References clang::Call, INT_TYPE_SWITCH, peekToAPSInt(), and clang::T.
Referenced by InterpretBuiltin().
|
static |
Three integral values followed by a pointer (lhs, rhs, carry, carryOut).
Definition at line 767 of file InterpBuiltin.cpp.
References align(), assignInteger(), clang::Call, clang::Func, clang::interp::Pointer::initialize(), peekToAPSInt(), primSize(), PT_Ptr, pushInteger(), and clang::Result.
Referenced by InterpretBuiltin().
|
static |
Definition at line 538 of file InterpBuiltin.cpp.
References clang::Call, EvaluateBuiltinClassifyType(), clang::Sema::getLangOpts(), clang::Expr::getType(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 519 of file InterpBuiltin.cpp.
References clang::Call, peekToAPSInt(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 828 of file InterpBuiltin.cpp.
References clang::Call, callArgSize(), clang::Func, peekToAPSInt(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
__builtin_complex(Float A, float B);
Definition at line 978 of file InterpBuiltin.cpp.
References align(), primSize(), PT_Float, PT_Ptr, and clang::Result.
Referenced by InterpretBuiltin().
|
static |
Definition at line 310 of file InterpBuiltin.cpp.
References clang::Copy, and clang::interp::Floating::getAPFloat().
Referenced by InterpretBuiltin().
|
static |
Definition at line 860 of file InterpBuiltin.cpp.
References clang::Call, callArgSize(), clang::Func, peekToAPSInt(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 638 of file InterpBuiltin.cpp.
References clang::Call, peekToAPSInt(), pushInteger(), and clang::Result.
Referenced by InterpretBuiltin().
|
static |
Definition at line 555 of file InterpBuiltin.cpp.
References align(), clang::Call, getLongPrimType(), peekToAPSInt(), primSize(), PT_Float, and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 491 of file InterpBuiltin.cpp.
References clang::interp::Floating::abs().
Referenced by InterpretBuiltin().
|
static |
Definition at line 597 of file InterpBuiltin.cpp.
References clang::Call, peekToAPSInt(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 342 of file InterpBuiltin.cpp.
References clang::interp::Floating::isNan(), clang::interp::Floating::isNegative(), clang::interp::Floating::isZero(), and clang::Result.
Referenced by InterpretBuiltin().
|
static |
Definition at line 323 of file InterpBuiltin.cpp.
References clang::interp::Floating::isNan(), clang::interp::Floating::isNegative(), clang::interp::Floating::isZero(), and clang::Result.
Referenced by InterpretBuiltin().
|
static |
Five int values followed by one floating value.
Definition at line 453 of file InterpBuiltin.cpp.
References align(), clang::Call, clang::interp::Floating::getCategory(), getIntPrimType(), clang::interp::Floating::isDenormal(), peekToAPSInt(), primSize(), PT_Float, and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 301 of file InterpBuiltin.cpp.
References clang::interp::Function::getDecl(), clang::interp::Floating::getInf(), and clang::FunctionDecl::getReturnType().
Referenced by InterpretBuiltin().
|
static |
__builtin_is_aligned() __builtin_align_up() __builtin_align_down() The first parameter is either an integer or a pointer.
The second parameter is the requested alignment as an integer.
Definition at line 1001 of file InterpBuiltin.cpp.
References clang::CharUnits::alignmentAtOffset(), clang::interp::Descriptor::asValueDecl(), clang::interp::Pointer::atIndex(), clang::Call, callArgSize(), clang::CharUnits::fromQuantity(), clang::Func, clang::interp::Pointer::getByteOffset(), clang::interp::Pointer::getDeclDesc(), clang::interp::Pointer::getIndex(), clang::CharUnits::getQuantity(), isIntegralType(), peekToAPSInt(), PT_Bool, PT_Ptr, and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 134 of file InterpBuiltin.cpp.
References clang::interp::InterpFrame::Caller, clang::SemaBase::Diag(), E, clang::interp::Boolean::from(), clang::interp::InterpFrame::getCallee(), clang::interp::InterpFrame::getExpr(), clang::Expr::getExprLoc(), clang::interp::InterpFrame::getRetPC(), and clang::Stmt::getSourceRange().
Referenced by InterpretBuiltin().
|
static |
Definition at line 397 of file InterpBuiltin.cpp.
References clang::Call, clang::interp::Floating::isFinite(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
First parameter to __builtin_isfpclass is the floating value, the second one is an integral value.
Definition at line 436 of file InterpBuiltin.cpp.
References align(), clang::Call, clang::interp::Floating::classify(), peekToAPSInt(), primSize(), PT_Float, pushInteger(), and clang::Result.
Referenced by InterpretBuiltin().
|
static |
Definition at line 384 of file InterpBuiltin.cpp.
References clang::Call, clang::interp::Floating::isInf(), clang::interp::Floating::isNegative(), and pushInteger().
Referenced by InterpretBuiltin().
|
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 365 of file InterpBuiltin.cpp.
References clang::Call, clang::interp::Floating::isNan(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 406 of file InterpBuiltin.cpp.
References clang::Call, clang::interp::Floating::isNormal(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 374 of file InterpBuiltin.cpp.
References clang::Call, clang::interp::Floating::isSignaling(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 415 of file InterpBuiltin.cpp.
References clang::Call, clang::interp::Floating::isDenormal(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 425 of file InterpBuiltin.cpp.
References clang::Call, clang::interp::Floating::isZero(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 627 of file InterpBuiltin.cpp.
References clang::Call, clang::Func, PT_Ptr, clang::T, and TYPE_SWITCH.
Referenced by InterpretBuiltin().
|
static |
Definition at line 240 of file InterpBuiltin.cpp.
References clang::interp::Pointer::atIndex(), CheckLoad(), clang::interp::Pointer::deref(), clang::interp::Function::getDecl(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getNumElems(), clang::FunctionDecl::getReturnType(), clang::interp::Descriptor::isPrimitiveArray(), and clang::Result.
Referenced by InterpretBuiltin().
|
static |
Definition at line 1107 of file InterpBuiltin.cpp.
References clang::Call, clang::analyze_os_log::computeOSLogBufferLayout(), clang::CharUnits::getQuantity(), pushInteger(), and clang::analyze_os_log::OSLogBufferLayout::size().
Referenced by InterpretBuiltin().
|
static |
Definition at line 660 of file InterpBuiltin.cpp.
References align(), assignInteger(), clang::Call, clang::Func, clang::interp::Pointer::initialize(), clang::interp::Pointer::isDummy(), clang::Type::isSignedIntegerOrEnumerationType(), peekToAPSInt(), primSize(), PT_Ptr, and clang::Result.
Referenced by InterpretBuiltin().
|
static |
Definition at line 510 of file InterpBuiltin.cpp.
References clang::Call, peekToAPSInt(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 500 of file InterpBuiltin.cpp.
References clang::Call, peekToAPSInt(), and pushInteger().
Referenced by InterpretBuiltin().
|
static |
Definition at line 1118 of file InterpBuiltin.cpp.
References clang::Call, pushInteger(), and clang::Result.
Referenced by InterpretBuiltin().
|
static |
rotateleft(value, amount)
Definition at line 574 of file InterpBuiltin.cpp.
References align(), clang::Call, peekToAPSInt(), primSize(), pushInteger(), clang::Result, and Right.
Referenced by InterpretBuiltin().
|
static |
Definition at line 164 of file InterpBuiltin.cpp.
References clang::AK_Read, clang::interp::Pointer::atIndex(), clang::Call, CheckLive(), CheckRange(), clang::interp::Pointer::deref(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getIndex(), clang::interp::Pointer::isDummy(), clang::interp::Descriptor::isPrimitiveArray(), pushInteger(), and clang::Result.
Referenced by InterpretBuiltin().
|
static |
Definition at line 207 of file InterpBuiltin.cpp.
References clang::AK_Read, clang::interp::Pointer::atIndex(), clang::Call, CheckArray(), CheckDummy(), CheckLive(), CheckRange(), clang::interp::Pointer::deref(), clang::interp::Pointer::getFieldDesc(), clang::interp::Pointer::getIndex(), clang::interp::Descriptor::isPrimitiveArray(), and pushInteger().
Referenced by InterpretBuiltin().
bool clang::interp::Interpret | ( | InterpState & | S, |
APValue & | Result | ||
) |
Interpreter entry point.
Definition at line 929 of file Interp.cpp.
References clang::interp::CodePtr::read().
bool clang::interp::InterpretBuiltin | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Function * | F, | ||
const CallExpr * | Call | ||
) |
Interpret a builtin function.
Definition at line 1130 of file InterpBuiltin.cpp.
References clang::Call, clang::interp::Function::getBuiltinID(), interp__builtin_addressof(), interp__builtin_atomic_lock_free(), interp__builtin_bitreverse(), interp__builtin_bswap(), interp__builtin_carryop(), interp__builtin_classify_type(), interp__builtin_clrsb(), interp__builtin_clz(), interp__builtin_complex(), interp__builtin_copysign(), interp__builtin_ctz(), interp__builtin_eh_return_data_regno(), interp__builtin_expect(), interp__builtin_fabs(), interp__builtin_ffs(), interp__builtin_fmax(), interp__builtin_fmin(), interp__builtin_fpclassify(), interp__builtin_inf(), interp__builtin_is_aligned_up_down(), interp__builtin_is_constant_evaluated(), interp__builtin_isfinite(), interp__builtin_isfpclass(), interp__builtin_isinf(), interp__builtin_isnan(), interp__builtin_isnormal(), interp__builtin_issignaling(), interp__builtin_issubnormal(), interp__builtin_iszero(), interp__builtin_move(), interp__builtin_nan(), 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_strcmp(), interp__builtin_strlen(), noopPointer(), and retPrimValue().
Referenced by CallBI().
bool clang::interp::InterpretOffsetOf | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const OffsetOfExpr * | E, | ||
llvm::ArrayRef< int64_t > | ArrayIndices, | ||
int64_t & | Result | ||
) |
Interpret an offsetof operation.
Definition at line 1470 of file InterpBuiltin.cpp.
References clang::OffsetOfNode::Array, clang::OffsetOfNode::Base, E, clang::OffsetOfNode::Field, clang::Type::getAs(), clang::ASTRecordLayout::getBaseClassOffset(), clang::RecordType::getDecl(), clang::ArrayType::getElementType(), clang::ASTRecordLayout::getFieldCount(), clang::FieldDecl::getFieldIndex(), clang::ASTRecordLayout::getFieldOffset(), clang::QualType::getNonReferenceType(), clang::ValueDecl::getType(), clang::CXXBaseSpecifier::getType(), clang::Expr::getType(), clang::OffsetOfNode::Identifier, clang::Decl::isInvalidDecl(), clang::CXXBaseSpecifier::isVirtual(), Node, and clang::Result.
Referenced by OffsetOf().
bool clang::interp::Inv | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 660 of file Interp.h.
References clang::interp::Boolean::inv(), and clang::T.
|
inline |
|
inline |
Same here, but only for casts.
Definition at line 2734 of file Interp.h.
References Loc, and Reinterpret.
|
inline |
Definition at line 2744 of file Interp.h.
References CheckDeclRef().
Definition at line 72 of file PrimType.h.
References PT_Bool, and clang::T.
Referenced by interp__builtin_is_aligned_up_down(), Neg(), clang::interp::Compiler< Emitter >::VisitCXXStdInitializerListExpr(), and clang::interp::Compiler< Emitter >::VisitUnaryOperator().
Definition at line 51 of file PrimType.h.
References PT_FnPtr, PT_MemberPtr, PT_Ptr, and clang::T.
Referenced by DecayPtr(), clang::interp::Compiler< Emitter >::VisitBinaryOperator(), clang::interp::Compiler< Emitter >::VisitBuiltinCallExpr(), clang::interp::Compiler< Emitter >::VisitCastExpr(), and clang::interp::Compiler< Emitter >::visitDeclRef().
bool clang::interp::LE | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1109 of file Interp.h.
References clang::Equal, and clang::Less.
Referenced by clang::interp::Compiler< Emitter >::VisitIntegerLiteral().
bool clang::interp::Load | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1663 of file Interp.h.
References CheckLoad(), clang::interp::Pointer::deref(), clang::interp::Pointer::isBlockPointer(), and clang::T.
bool clang::interp::LoadPop | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1674 of file Interp.h.
References CheckLoad(), clang::interp::Pointer::deref(), clang::interp::Pointer::isBlockPointer(), and clang::T.
bool clang::interp::LT | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1102 of file Interp.h.
References clang::Less.
|
inline |
Definition at line 1792 of file Interp.h.
References CheckLoad(), and DoMemcpy().
bool clang::interp::Mul | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
|
inline |
Definition at line 425 of file Interp.h.
References clang::interp::Pointer::atIndex(), clang::C, D, clang::interp::Pointer::deref(), HandleComplexComplexMul(), clang::Result, and clang::T.
|
inline |
Definition at line 414 of file Interp.h.
References CheckFloatResult(), clang::interp::Floating::mul(), and clang::Result.
|
inline |
Definition at line 2362 of file Interp.h.
References clang::interp::Pointer::narrow().
Referenced by ArrayElemPtr(), and ArrayElemPtrPop().
bool clang::interp::NE | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1095 of file Interp.h.
References clang::Equal.
Referenced by ctorArrayTy(), dtorArrayTy(), and moveArrayTy().
bool clang::interp::Neg | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 676 of file Interp.h.
References E, clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), isIntegralType(), Loc, clang::Result, clang::T, and toString().
|
static |
Just takes the first Argument to the call and puts it on the stack.
Definition at line 652 of file InterpBuiltin.cpp.
Referenced by InterpretBuiltin().
|
inline |
|
inline |
bool clang::interp::OffsetHelper | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const T & | Offset, | ||
const Pointer & | Ptr | ||
) |
Definition at line 1825 of file Interp.h.
References Add, clang::interp::Pointer::asBlockPointer(), clang::interp::Pointer::atIndex(), clang::interp::BlockPointer::Base, CheckArray(), CheckNull(), clang::CSK_ArrayIndex, clang::interp::Pointer::getIndex(), clang::Sema::getLangOpts(), clang::interp::Pointer::getNumElems(), clang::interp::Pointer::inArray(), clang::Invalid, clang::interp::Pointer::isBlockPointer(), clang::interp::Pointer::isOnePastEnd(), clang::interp::BlockPointer::Pointee, and clang::Result.
|
inline |
Definition at line 2772 of file Interp.h.
References E, InterpretOffsetOf(), clang::Result, and clang::T.
|
inline |
Definition at line 151 of file Boolean.h.
References clang::interp::Boolean::print().
|
inline |
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().
|
inline |
Definition at line 85 of file FunctionPointer.h.
References clang::interp::FunctionPointer::print().
llvm::raw_ostream & clang::interp::operator<< | ( | llvm::raw_ostream & | OS, |
Integral< Bits, Signed > | I | ||
) |
Definition at line 299 of file Integral.h.
References clang::interp::Integral< Bits, Signed >::print().
|
inline |
Definition at line 314 of file IntegralAP.h.
References clang::interp::IntegralAP< Signed >::print().
|
inline |
Definition at line 59 of file PrimType.h.
References Atomic, and Reinterpret.
|
inline |
Definition at line 104 of file MemberPointer.h.
References clang::interp::MemberPointer::print().
|
static |
Peek an integer value from the stack into an APSInt.
Definition at line 63 of file InterpBuiltin.cpp.
References align(), INT_TYPE_SWITCH, clang::interp::InterpStack::peek(), primSize(), and clang::T.
Referenced by interp__builtin_atomic_lock_free(), interp__builtin_bitreverse(), interp__builtin_bswap(), interp__builtin_carryop(), interp__builtin_clrsb(), interp__builtin_clz(), interp__builtin_ctz(), interp__builtin_eh_return_data_regno(), interp__builtin_expect(), interp__builtin_ffs(), interp__builtin_fpclassify(), interp__builtin_is_aligned_up_down(), interp__builtin_isfpclass(), interp__builtin_overflowop(), interp__builtin_parity(), interp__builtin_popcount(), and interp__builtin_rotate().
bool clang::interp::Pop | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
|
static |
Definition at line 193 of file Interp.cpp.
References PT_Ptr, clang::T, and TYPE_SWITCH.
Referenced by cleanupAfterFunctionCall().
Returns the size of a primitive type in bytes.
Definition at line 23 of file PrimType.cpp.
References clang::T, and TYPE_SWITCH.
Referenced by AllocN(), Call(), callArgSize(), CallPtr(), CallVar(), CallVirt(), CheckNonNullArgs(), clang::interp::ByteCodeEmitter::compileFunc(), clang::interp::Program::createDescriptor(), clang::interp::InterpFrame::describe(), clang::interp::InterpStack::dump(), clang::interp::Function::getWrittenArgSize(), interp__builtin_atomic_lock_free(), interp__builtin_carryop(), interp__builtin_complex(), interp__builtin_expect(), interp__builtin_fpclassify(), interp__builtin_isfpclass(), interp__builtin_overflowop(), interp__builtin_rotate(), peekToAPSInt(), clang::interp::Compiler< Emitter >::VisitCallExpr(), clang::interp::Compiler< Emitter >::VisitCXXConstructExpr(), and clang::interp::Compiler< Emitter >::VisitCXXInheritedCtorInitExpr().
|
inlinestatic |
Definition at line 2177 of file Interp.h.
References E, clang::Sema::getLangOpts(), and clang::interp::Pointer::isZero().
|
static |
Pushes Val
on the stack as the type given by QT
.
Definition at line 74 of file InterpBuiltin.cpp.
References INT_TYPE_SWITCH, clang::Type::isSignedIntegerOrEnumerationType(), clang::Type::isUnsignedIntegerOrEnumerationType(), clang::T, and V.
Referenced by 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_expect(), interp__builtin_ffs(), interp__builtin_fpclassify(), interp__builtin_is_aligned_up_down(), interp__builtin_isfinite(), interp__builtin_isfpclass(), interp__builtin_isinf(), interp__builtin_isnan(), interp__builtin_isnormal(), interp__builtin_issignaling(), interp__builtin_issubnormal(), interp__builtin_iszero(), interp__builtin_os_log_format_buffer_size(), interp__builtin_parity(), interp__builtin_popcount(), interp__builtin_ptrauth_string_discriminator(), interp__builtin_rotate(), interp__builtin_strcmp(), interp__builtin_strlen(), and pushInteger().
|
static |
Definition at line 91 of file InterpBuiltin.cpp.
References pushInteger(), and clang::T.
|
inline |
Definition at line 2971 of file Interp.h.
References clang::interp::CodePtr::read(), and clang::T.
|
inline |
Definition at line 2980 of file Interp.h.
References align(), clang::interp::Floating::bytesToSerialize(), and clang::interp::Floating::deserialize().
|
inline |
|
inline |
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 606 of file Interp.h.
References CheckDivRem(), clang::Result, and clang::T.
bool clang::interp::Ret | ( | InterpState & | S, |
CodePtr & | PC, | ||
APValue & | Result | ||
) |
Definition at line 275 of file Interp.h.
References cleanupAfterFunctionCall(), clang::Result, Ret(), and clang::T.
Referenced by clang::interp::Record::getName(), and Ret().
|
static |
bool clang::interp::ReturnValue | ( | const InterpState & | S, |
const T & | V, | ||
APValue & | R | ||
) |
|
inline |
Definition at line 309 of file Interp.h.
References cleanupAfterFunctionCall().
Referenced by retPrimValue().
bool clang::interp::RunDestructors | ( | InterpState & | S, |
CodePtr | OpPC, | ||
const Block * | B | ||
) |
Definition at line 879 of file Interp.cpp.
References clang::interp::Pointer::atIndex(), clang::interp::Descriptor::ElemDesc, clang::interp::Block::getDescriptor(), clang::interp::Descriptor::getNumElems(), clang::interp::Descriptor::isCompositeArray(), clang::interp::Descriptor::isPrimitive(), clang::interp::Descriptor::isPrimitiveArray(), clang::interp::Descriptor::isRecord(), clang::interp::Pointer::narrow(), and runRecordDestructor().
Referenced by Free().
|
static |
Definition at line 834 of file Interp.cpp.
References clang::interp::Pointer::atField(), clang::interp::Pointer::atIndex(), clang::interp::Record::bases(), clang::Call, D, clang::interp::Descriptor::ElemDesc, clang::interp::Descriptor::ElemRecord, clang::interp::Record::fields(), clang::interp::Record::getDestructor(), clang::interp::Descriptor::getNumElems(), clang::interp::Descriptor::isRecord(), clang::FunctionDecl::isTrivial(), clang::interp::Pointer::narrow(), and runRecordDestructor().
Referenced by RunDestructors(), and runRecordDestructor().
|
inline |
bool clang::interp::SetField | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
Definition at line 1225 of file Interp.h.
References CheckNull(), CheckRange(), CheckStore(), clang::CSK_Field, and clang::T.
bool clang::interp::SetGlobal | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
bool clang::interp::SetLocal | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
bool clang::interp::SetParam | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
bool clang::interp::SetThisField | ( | InterpState & | S, |
CodePtr | OpPC, | ||
uint32_t | I | ||
) |
Definition at line 1271 of file Interp.h.
References CheckStore(), CheckThis(), clang::T, and This().
bool clang::interp::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.
Definition at line 1544 of file InterpBuiltin.cpp.
References clang::interp::Pointer::atField(), clang::interp::Pointer::deref(), clang::interp::Record::getField(), clang::interp::Record::getNumFields(), clang::interp::Pointer::getRecord(), clang::interp::Pointer::getType(), clang::interp::Pointer::initialize(), INT_TYPE_SWITCH, clang::interp::Record::Field::Offset, and clang::T.
Referenced by CMP3().
|
inline |
|
inline |
|
inline |
bool clang::interp::Store | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1685 of file Interp.h.
References CheckStore(), clang::interp::Pointer::initialize(), and clang::T.
bool clang::interp::StoreBitField | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1709 of file Interp.h.
References CheckStore(), clang::interp::Pointer::initialize(), and clang::T.
bool clang::interp::StoreBitFieldPop | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1724 of file Interp.h.
References CheckStore(), clang::interp::Pointer::initialize(), and clang::T.
bool clang::interp::StorePop | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
Definition at line 1697 of file Interp.h.
References CheckStore(), clang::interp::Pointer::initialize(), and clang::T.
bool clang::interp::Sub | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
|
inline |
Definition at line 396 of file Interp.h.
References CheckFloatResult(), clang::Result, and clang::interp::Floating::sub().
bool clang::interp::SubOffset | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
|
inline |
1) Pops a Pointer from the stack.
2) Pops another Pointer from the stack. 3) Pushes the different of the indices of the two pointers on the stack.
Definition at line 1974 of file Interp.h.
References clang::interp::Pointer::getIndex(), clang::Sema::getLangOpts(), clang::interp::Pointer::getNumElems(), clang::interp::Pointer::hasSameBase(), clang::interp::Pointer::isElementPastEnd(), clang::interp::Pointer::isZero(), and clang::T.
|
inline |
Definition at line 2230 of file Interp.h.
References CheckThis(), and This().
Referenced by CheckThis(), GetPtrActiveThisField(), GetPtrThisBase(), GetPtrThisField(), GetPtrThisVirtBase(), GetThisField(), InitThisBitField(), InitThisField(), InitThisFieldActive(), SetThisField(), and This().
|
inline |
Definition at line 1802 of file Interp.h.
References clang::Member.
|
inline |
|
inline |
Definition at line 1627 of file Interp.h.
Referenced by GetPtrThisVirtBase(), and GetPtrVirtBasePop().
bool clang::interp::Zero | ( | InterpState & | S, |
CodePtr | OpPC | ||
) |
|
inlinestatic |
Definition at line 2209 of file Interp.h.
References clang::interp::IntegralAP< Signed >::zero().
|
inlinestatic |
Definition at line 2214 of file Interp.h.
References clang::interp::IntegralAP< Signed >::zero().