clang 20.0.0git
|
#include "clang/Interpreter/Value.h"
Classes | |
struct | convertFwd |
struct | convertFwd< T * > |
Public Types | |
enum | Kind { K_Void , K_PtrOrObj , K_Unspecified } |
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 |
enum clang::Value::Kind |
|
default |
Referenced by findValueTableByValue(), and clang::TemplateArgument::getAsStructuralValue().
clang::Value::Value | ( | Interpreter * | In, |
void * | Ty | ||
) |
Definition at line 123 of file Value.cpp.
References clang::Interpreter::CompileDtorCall(), 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.
clang::Value::Value | ( | const Value & | RHS | ) |
Definition at line 169 of file Value.cpp.
References getPtr(), and IsManuallyAlloc.
|
noexcept |
Definition at line 176 of file Value.cpp.
References clang::Data.
Get to the value with type checking casting the underlying stored value to T.
Definition at line 163 of file Value.h.
References REPL_BUILTIN_TYPES, and clang::T.
|
inline |
Definition at line 202 of file Value.h.
References Data, and isPointerOrObjectType().
void clang::Value::clear | ( | ) |
Definition at line 218 of file Value.cpp.
References getPtr(), Interp, IsManuallyAlloc, K_Unspecified, OpaqueType, and ValueKind.
Referenced by clang::ASTContext::cleanup(), clang::Interpreter::ParseAndExecute(), and ~Value().
|
inline |
void clang::Value::dump | ( | ) | const |
Definition at line 256 of file Value.cpp.
References print().
Referenced by clang::Interpreter::ParseAndExecute().
ASTContext & clang::Value::getASTContext | ( | ) |
Definition at line 250 of file Value.cpp.
References clang::Interpreter::getASTContext(), and getInterpreter().
Referenced by Value().
const ASTContext & clang::Value::getASTContext | ( | ) | const |
Definition at line 252 of file Value.cpp.
References clang::Interpreter::getASTContext(), and getInterpreter().
Interpreter & clang::Value::getInterpreter | ( | ) |
Definition at line 238 of file Value.cpp.
References Interp.
Referenced by getASTContext(), and Value().
const Interpreter & clang::Value::getInterpreter | ( | ) | const |
|
inline |
Definition at line 136 of file Value.h.
Referenced by __clang_Interpreter_SetValueNoAlloc(), clang::ODRHash::AddStructuralValue(), clang::ento::SimpleConstraintManager::assumeInclusiveRangeInternal(), clang::ConstantExpr::getStorageKind(), isConfigurationPattern(), isSimpleAPValue(), clang::ConstantExpr::MoveIntoResult(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), and clang::TextNodeDumper::Visit().
void * clang::Value::getPtr | ( | ) | const |
Definition at line 229 of file Value.cpp.
References Data, K_PtrOrObj, and ValueKind.
Referenced by __clang_Interpreter_SetValueWithAlloc(), clear(), operator=(), and Value().
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(), isUnsigned(), clang::Sema::PerformMoveOrCopyInitialization(), Value(), and clang::interp::Compiler< Emitter >::visitSwitchStmt().
|
inline |
Definition at line 134 of file Value.h.
Referenced by CheckEvaluationResult(), and HandleConstructorCall().
|
inlineprotected |
|
inline |
Definition at line 132 of file Value.h.
Referenced by clang::Interpreter::ParseAndExecute().
|
inline |
Definition at line 133 of file Value.h.
Referenced by __clang_Interpreter_SetValueNoAlloc().
Definition at line 187 of file Value.cpp.
References Data, getPtr(), Interp, IsManuallyAlloc, OpaqueType, and ValueKind.
Definition at line 203 of file Value.cpp.
References clang::Data.
void clang::Value::print | ( | llvm::raw_ostream & | Out | ) | const |
void clang::Value::printData | ( | llvm::raw_ostream & | Out | ) | const |
void clang::Value::printType | ( | llvm::raw_ostream & | Out | ) | const |
|
inline |
|
inline |
Definition at line 141 of file Value.h.
References Data.
Referenced by __clang_Interpreter_SetValueNoAlloc(), and Value().
|
protected |
Definition at line 197 of file Value.h.
Referenced by as(), getPtr(), and operator=().
|
protected |
Definition at line 195 of file Value.h.
Referenced by clear(), getInterpreter(), operator=(), and Value().
Definition at line 199 of file Value.h.
Referenced by clear(), operator=(), and Value().
|
protected |
|
protected |