clang: clang::Value Class Reference (original) (raw)

#include "[clang/Interpreter/Value.h](Interpreter%5F2Value%5F8h%5Fsource.html)"

Public Member Functions
Value ()=default
Value (Interpreter *In, void *Ty)
Value (const Value &RHS)
Value (Value &&RHS) noexcept
Value & operator= (const Value &RHS)
Value & operator= (Value &&RHS) noexcept
~Value ()
void printType (llvm::raw_ostream &Out) const
void printData (llvm::raw_ostream &Out) const
void print (llvm::raw_ostream &Out) const
void dump () const
void clear ()
ASTContext & getASTContext ()
const ASTContext & getASTContext () const
Interpreter & getInterpreter ()
const Interpreter & getInterpreter () const
QualType getType () const
bool isValid () const
bool isVoid () const
bool hasValue () const
bool isManuallyAlloc () const
Kind getKind () const
void setKind (Kind K)
void setOpaqueType (void *Ty)
void * getPtr () const
void setPtr (void *Ptr)
template<typename T >
REPL_BUILTIN_TYPES T convertTo () const
Get the value with cast.
template<>
void * as () const
Protected Member Functions
bool isPointerOrObjectType () const
template<typename T >
T as () const
Get to the value with type checking casting the underlying stored value to T.
Protected Attributes
Interpreter * Interp = nullptr
void * OpaqueType = nullptr
Storage Data
Kind ValueKind = K_Unspecified
bool IsManuallyAlloc = false

Definition at line 94 of file Value.h.

Kind

Enumerator
K_Void
K_PtrOrObj
K_Unspecified

Definition at line 103 of file Value.h.

Value() [1/4]

clang::Value::Value ( ) default

Value() [2/4]

Definition at line 123 of file Value.cpp.

References clang::ConvertQualTypeToKind(), clang::Type::getAs(), getASTContext(), clang::QualType::getCanonicalType(), getInterpreter(), clang::CharUnits::getQuantity(), getType(), clang::QualType::getTypePtr(), clang::ASTContext::getTypeSizeInChars(), Interp, clang::Type::isConstantArrayType(), IsManuallyAlloc, clang::Type::isMemberPointerType(), clang::Type::isObjectType(), clang::Type::isPointerType(), clang::Type::isRecordType(), clang::Type::isReferenceType(), K_PtrOrObj, setKind(), setPtr(), and ValueKind.

Value() [3/4]

clang::Value::Value ( const Value & RHS )

Value() [4/4]

clang::Value::Value ( Value && RHS) noexcept

as() [1/2]

template<typename T >

T clang::Value::as ( ) const inlineprotected

as() [2/2]

template<>

void * clang::Value::as ( ) const inline

clear()

void clang::Value::clear ( )

convertTo()

Get the value with cast.

Get the value cast to T. This is similar to reinterpret_cast(value), casting the value of builtins (except void), enums and pointers. Values referencing an object are treated as pointers to the object.

Definition at line 155 of file Value.h.

References clang::T.

dump()

void clang::Value::dump ( ) const

getASTContext() [1/2]

getASTContext() [2/2]

const ASTContext & clang::Value::getASTContext ( ) const

getInterpreter() [1/2]

getInterpreter() [2/2]

const Interpreter & clang::Value::getInterpreter ( ) const

getKind()

Kind clang::Value::getKind ( ) const inline

getPtr()

void * clang::Value::getPtr ( ) const

getType()

QualType clang::Value::getType ( ) const

Definition at line 234 of file Value.cpp.

References clang::QualType::getFromOpaquePtr(), and OpaqueType.

Referenced by __clang_Interpreter_SetValueNoAlloc(), AddResultTypeChunk(), applyNullability(), clang::ast_matchers::AST_POLYMORPHIC_MATCHER_P2(), buildFMulAdd(), clang::Sema::BuildStmtExpr(), CheckEvaluationResult(), ClassifyMemberExpr(), createCastsForTypeOfSameSize(), DeduceNonTypeTemplateArgument(), DeduceNullPtrTemplateArgument(), EmitBitfieldTruncationCheckHelper(), EmitBitTestIntrinsic(), EmitGEPOffsetInBytes(), EmitIntegerSignChangeCheckHelper(), EmitIntegerTruncationCheckHelper(), EmitllvmFAbs(), EmitOverflowCheckedAbs(), emitPointerArithmetic(), EmitScalarFMAExpr(), EmitX86CvtF16ToFloatExpr(), EmitX86FMAExpr(), EmitX86FunnelShift(), EmitX86ScalarSelect(), EmitX86Select(), EmitX86vpcom(), clang::getDeclUsageType(), getMaskVecValue(), handleHlslSplitdouble(), isReferenceToNonConstCapture(), isUnsigned(), clang::Sema::PerformMoveOrCopyInitialization(), Value(), and clang::interp::Compiler< Emitter >::visitSwitchStmt().

hasValue()

bool clang::Value::hasValue ( ) const inline

isManuallyAlloc()

bool clang::Value::isManuallyAlloc ( ) const inline

isPointerOrObjectType()

bool clang::Value::isPointerOrObjectType ( ) const inlineprotected

isValid()

bool clang::Value::isValid ( ) const inline

isVoid()

bool clang::Value::isVoid ( ) const inline

operator=() [1/2]

Value & clang::Value::operator= ( const Value & RHS )

operator=() [2/2]

Value & clang::Value::operator= ( Value && RHS) noexcept

print()

void clang::Value::print ( llvm::raw_ostream & Out ) const

printData()

void clang::Value::printData ( llvm::raw_ostream & Out ) const

printType()

void clang::Value::printType ( llvm::raw_ostream & Out ) const

setKind()

void clang::Value::setKind ( Kind K) inline

setOpaqueType()

void clang::Value::setOpaqueType ( void * Ty) inline

setPtr()

void clang::Value::setPtr ( void * Ptr) inline

Data

Storage clang::Value::Data protected

Interp

IsManuallyAlloc

OpaqueType

void* clang::Value::OpaqueType = nullptr protected

ValueKind


The documentation for this class was generated from the following files: