|
clang 24.0.0git
|
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat], [Complex APSInt] [Complex APFloat], [Expr + Offset], [Vector: N * APValue], [Array: N * APValue]. More...
#include "clang/AST/APValue.h"
Classes | |
| struct | ConstexprUnknown |
| struct | LV |
| class | LValueBase |
| class | LValuePathEntry |
| A non-discriminated union of a base, field, or array index. More... | |
| class | LValuePathSerializationHelper |
| struct | MemberPointerData |
| struct | NoLValuePath |
| struct | UninitArray |
| struct | UninitStruct |
Public Types | |
| enum | ValueKind { None , Indeterminate , Int , Float , FixedPoint , ComplexInt , ComplexFloat , LValue , Vector , Matrix , Array , Struct , Union , MemberPointer , AddrLabelDiff , Reflection } |
| typedef llvm::PointerIntPair< const Decl *, 1, bool > | BaseOrMemberType |
| A FieldDecl or CXXRecordDecl, along with a flag indicating whether we mean a virtual or non-virtual base class subobject. | |
Public Member Functions | |
| bool | allowConstexprUnknown () const |
| void | setConstexprUnknown (bool IsConstexprUnknown=true) |
| APValue () | |
| Creates an empty APValue of type None. | |
| APValue (APSInt I) | |
| Creates an integer APValue holding the given value. | |
| APValue (APFloat F) | |
| Creates a float APValue holding the given value. | |
| APValue (APFixedPoint FX) | |
| Creates a fixed-point APValue holding the given value. | |
| APValue (const APValue *E, unsigned N) | |
Creates a vector APValue with N elements. | |
| APValue (const APValue *E, unsigned NumRows, unsigned NumCols) | |
| Creates a matrix APValue with given dimensions. | |
| APValue (APSInt R, APSInt I) | |
| Creates an integer complex APValue with the given real and imaginary values. | |
| APValue (APFloat R, APFloat I) | |
| Creates a float complex APValue with the given real and imaginary values. | |
| APValue (const APValue &RHS) | |
| APValue (APValue &&RHS) | |
| APValue (LValueBase Base, CharUnits Offset, NoLValuePath, bool IsNullPtr=false) | |
| Creates an lvalue APValue without an lvalue path. | |
| APValue (LValueBase Base, CharUnits Offset, ArrayRef< LValuePathEntry > Path, bool OnePastTheEnd, bool IsNullPtr=false) | |
| Creates an lvalue APValue with an lvalue path. | |
| APValue (LValueBase Base, CharUnits Offset, ConstexprUnknown, bool IsNullPtr=false) | |
| Creates a constexpr unknown lvalue APValue. | |
| APValue (UninitArray, unsigned InitElts, unsigned Size) | |
| Creates a new array APValue. | |
| APValue (ReflectionKind OperandKind, const void *Operand) | |
| Creates a new Reflection APValue. | |
| APValue (UninitStruct, unsigned NumBases, unsigned NumMembers, unsigned NumVirtualBases=0) | |
| Creates a new struct APValue. | |
| APValue (const FieldDecl *ActiveDecl, const APValue &ActiveValue=APValue()) | |
| Creates a new union APValue. | |
| APValue (const ValueDecl *Member, bool IsDerivedMember, ArrayRef< const CXXRecordDecl * > Path) | |
| Creates a new member pointer APValue. | |
| APValue (const AddrLabelExpr *LHSExpr, const AddrLabelExpr *RHSExpr) | |
| Creates a new address label diff APValue. | |
| APValue & | operator= (const APValue &RHS) |
| APValue & | operator= (APValue &&RHS) |
| ~APValue () | |
| bool | needsCleanup () const |
| Returns whether the object performed allocations. | |
| void | swap (APValue &RHS) |
| Swaps the contents of this and the given APValue. | |
| void | Profile (llvm::FoldingSetNodeID &ID) const |
| profile this value. | |
| ValueKind | getKind () const |
| void | visit (llvm::function_ref< bool(const APValue &)> Visitor) const |
| Visit this value and every recursively nested value. | |
| bool | isAbsent () const |
| bool | isIndeterminate () const |
| bool | hasValue () const |
| bool | isInt () const |
| bool | isFloat () const |
| bool | isFixedPoint () const |
| bool | isComplexInt () const |
| bool | isComplexFloat () const |
| bool | isLValue () const |
| bool | isVector () const |
| bool | isMatrix () const |
| bool | isArray () const |
| bool | isStruct () const |
| bool | isUnion () const |
| bool | isMemberPointer () const |
| bool | isAddrLabelDiff () const |
| bool | isReflection () const |
| void | dump () const |
| void | dump (raw_ostream &OS, const ASTContext &Context) const |
| void | printPretty (raw_ostream &OS, const ASTContext &Ctx, QualType Ty) const |
| void | printPretty (raw_ostream &OS, const PrintingPolicy &Policy, QualType Ty, const ASTContext *Ctx=nullptr) const |
| std::string | getAsString (const ASTContext &Ctx, QualType Ty) const |
| APSInt & | getInt () |
| const APSInt & | getInt () const |
| bool | toIntegralConstant (APSInt &Result, QualType SrcTy, const ASTContext &Ctx) const |
| Try to convert this value to an integral constant. | |
| APFloat & | getFloat () |
| const APFloat & | getFloat () const |
| APFixedPoint & | getFixedPoint () |
| const APFixedPoint & | getFixedPoint () const |
| APSInt & | getComplexIntReal () |
| const APSInt & | getComplexIntReal () const |
| APSInt & | getComplexIntImag () |
| const APSInt & | getComplexIntImag () const |
| APFloat & | getComplexFloatReal () |
| const APFloat & | getComplexFloatReal () const |
| APFloat & | getComplexFloatImag () |
| const APFloat & | getComplexFloatImag () const |
| const LValueBase | getLValueBase () const |
| CharUnits & | getLValueOffset () |
| CharUnits | getLValueOffset () const |
| bool | isLValueOnePastTheEnd () const |
| bool | hasLValuePath () const |
| ArrayRef< LValuePathEntry > | getLValuePath () const |
| unsigned | getLValueCallIndex () const |
| unsigned | getLValueVersion () const |
| bool | isNullPointer () const |
| APValue & | getVectorElt (unsigned I) |
| const APValue & | getVectorElt (unsigned I) const |
| unsigned | getVectorLength () const |
| unsigned | getMatrixNumRows () const |
| unsigned | getMatrixNumColumns () const |
| unsigned | getMatrixNumElements () const |
| APValue & | getMatrixElt (unsigned Idx) |
| const APValue & | getMatrixElt (unsigned Idx) const |
| APValue & | getMatrixElt (unsigned Row, unsigned Col) |
| const APValue & | getMatrixElt (unsigned Row, unsigned Col) const |
| APValue & | getArrayInitializedElt (unsigned I) |
| const APValue & | getArrayInitializedElt (unsigned I) const |
| bool | hasArrayFiller () const |
| APValue & | getArrayFiller () |
| const APValue & | getArrayFiller () const |
| unsigned | getArrayInitializedElts () const |
| unsigned | getArraySize () const |
| unsigned | getStructNumBases () const |
| unsigned | getStructNumFields () const |
| unsigned | getStructNumVirtualBases () const |
| APValue & | getStructBase (unsigned i) |
| APValue & | getStructField (unsigned i) |
| APValue & | getStructVirtualBase (unsigned i) |
| const APValue & | getStructBase (unsigned i) const |
| const APValue & | getStructField (unsigned i) const |
| const APValue & | getStructVirtualBase (unsigned i) const |
| const FieldDecl * | getUnionField () const |
| APValue & | getUnionValue () |
| const APValue & | getUnionValue () const |
| const ValueDecl * | getMemberPointerDecl () const |
| bool | isMemberPointerToDerivedMember () const |
| ArrayRef< const CXXRecordDecl * > | getMemberPointerPath () const |
| const AddrLabelExpr * | getAddrLabelDiffLHS () const |
| const AddrLabelExpr * | getAddrLabelDiffRHS () const |
| ReflectionKind | getReflectionOperandKind () const |
| const void * | getReflectionOpaqueOperand () const |
| void | setInt (APSInt I) |
| void | setFloat (APFloat F) |
| void | setFixedPoint (APFixedPoint FX) |
| void | setVector (const APValue *E, unsigned N) |
| void | setMatrix (const APValue *E, unsigned NumRows, unsigned NumCols) |
| void | setComplexInt (APSInt R, APSInt I) |
| void | setComplexFloat (APFloat R, APFloat I) |
| void | setLValue (LValueBase B, CharUnits O, NoLValuePath, bool IsNullPtr) |
| void | setLValue (LValueBase B, CharUnits O, ArrayRef< LValuePathEntry > Path, bool OnePastTheEnd, bool IsNullPtr) |
| void | setUnion (const FieldDecl *Field, const APValue &Value) |
| void | setAddrLabelDiff (const AddrLabelExpr *LHSExpr, const AddrLabelExpr *RHSExpr) |
Static Public Member Functions | |
| static APValue | IndeterminateValue () |
Friends | |
| template<typename Impl> | |
| class | clang::serialization::BasicReaderBase |
| class | ASTImporter |
| class | ASTNodeImporter |
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat], [Complex APSInt] [Complex APFloat], [Expr + Offset], [Vector: N * APValue], [Array: N * APValue].
| typedef llvm::PointerIntPair<const Decl *, 1, bool> clang::APValue::BaseOrMemberType |
A FieldDecl or CXXRecordDecl, along with a flag indicating whether we mean a virtual or non-virtual base class subobject.
| Enumerator | |
|---|---|
| None | There is no such object (it's outside its lifetime). |
| Indeterminate | This object has an indeterminate value (C++ [basic.indet]). |
| Int | |
| Float | |
| FixedPoint | |
| ComplexInt | |
| ComplexFloat | |
| LValue | |
| Vector | |
| Matrix | |
| Array | |
| Struct | |
| Union | |
| MemberPointer | |
| AddrLabelDiff | |
| Reflection | |
|
inline |
Creates an empty APValue of type None.
Definition at line 385 of file APValue.h.
Referenced by APValue(), APValue(), APValue(), APValue(), APValue(), getArrayFiller(), getArrayFiller(), getArrayInitializedElt(), getArrayInitializedElt(), getComplexFloatImag(), getComplexFloatReal(), getComplexIntImag(), getComplexIntReal(), getFixedPoint(), getFloat(), getInt(), getLValueOffset(), getMatrixElt(), getMatrixElt(), getMatrixElt(), getMatrixElt(), getStructBase(), getStructBase(), getStructField(), getStructField(), getStructVirtualBase(), getStructVirtualBase(), getUnionValue(), getUnionValue(), getVectorElt(), getVectorElt(), IndeterminateValue(), operator=(), operator=(), setMatrix(), setUnion(), setVector(), swap(), and visit().
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
| APValue::APValue | ( | const APValue & | RHS | ) |
Definition at line 360 of file APValue.cpp.
References AddrLabelDiff, APValue(), Array, ComplexFloat, ComplexInt, getAddrLabelDiffLHS(), getAddrLabelDiffRHS(), getArrayFiller(), getArrayInitializedElt(), getArrayInitializedElts(), getArraySize(), getComplexFloatImag(), getComplexFloatReal(), getComplexIntImag(), getComplexIntReal(), getKind(), getLValueBase(), getLValueOffset(), getLValuePath(), getMatrixNumColumns(), getMatrixNumRows(), getMemberPointerDecl(), getMemberPointerPath(), getReflectionOpaqueOperand(), getReflectionOperandKind(), getStructBase(), getStructField(), getStructNumBases(), getStructNumFields(), getStructNumVirtualBases(), getStructVirtualBase(), getUnionField(), getUnionValue(), getVectorLength(), hasArrayFiller(), hasLValuePath(), isLValueOnePastTheEnd(), isMemberPointerToDerivedMember(), isNullPointer(), LValue, Matrix, MemberPointer, None, Reflection, setAddrLabelDiff(), setComplexFloat(), setComplexInt(), setLValue(), setMatrix(), setUnion(), setVector(), Struct, Union, and Vector.
| APValue::APValue | ( | APValue && | RHS | ) |
Definition at line 442 of file APValue.cpp.
|
inline |
|
inline |
Creates an lvalue APValue with an lvalue path.
| Base | The base of the lvalue. |
| Offset | The offset of the lvalue. |
| Path | The lvalue path. |
| OnePastTheEnd | Whether this lvalue is one-past-the-end of the subobject it points to. |
| IsNullPtr | Whether this lvalue is a null pointer. |
Definition at line 439 of file APValue.h.
References false, None, and setLValue().
|
inline |
|
inline |
Creates a new array APValue.
| UninitArray | Marker. Pass an empty UninitArray. |
| InitElts | Number of elements you're going to initialize in the array. |
| Size | Full size of the array. |
|
inline |
|
inline |
Creates a new struct APValue.
| UninitStruct | Marker. Pass an empty UninitStruct. |
| NumBases | Number of bases. |
| NumMembers | Number of members. |
| NumVirtualBases | Number of virtual bases. |
|
inline |
|
inline |
|
inline |
Definition at line 517 of file APValue.h.
References Indeterminate, and None.
|
inline |
Definition at line 378 of file APValue.h.
Referenced by HandleLambdaCapture().
| LLVM_DUMP_METHOD void APValue::dump | ( | ) | const |
Definition at line 345 of file ASTDumper.cpp.
References clang::ASTNodeTraverser< Derived, NodeDelegateType >::Visit().
| LLVM_DUMP_METHOD void APValue::dump | ( | raw_ostream & | OS, |
| const ASTContext & | Context ) const |
Definition at line 350 of file ASTDumper.cpp.
References showColorsForStream(), and clang::ASTNodeTraverser< Derived, NodeDelegateType >::Visit().
|
inline |
Definition at line 773 of file APValue.h.
References isAddrLabelDiff().
Referenced by APValue(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), Profile(), and clang::CIRGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 777 of file APValue.h.
References isAddrLabelDiff().
Referenced by APValue(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), Profile(), and clang::CIRGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 702 of file APValue.h.
References APValue(), getArrayInitializedElts(), hasArrayFiller(), and isArray().
Referenced by APValue(), buildConstantDataArrayFromElements(), expandArray(), findSubobject(), getArrayFiller(), Profile(), clang::CIRGen::ConstantEmitter::tryEmitPrivate(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
|
inline |
Definition at line 707 of file APValue.h.
References APValue(), and getArrayFiller().
Definition at line 691 of file APValue.h.
References APValue(), getArrayInitializedElts(), and isArray().
Referenced by APValue(), buildConstantDataArrayFromElements(), expandArray(), clang::GCCAsmStmt::ExtractStringFromGCCAsmStmtComponent(), findSubobject(), getArrayInitializedElt(), clang::MSGuidDecl::getAsAPValue(), printPretty(), Profile(), clang::CIRGen::ConstantEmitter::tryEmitPrivate(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
Definition at line 696 of file APValue.h.
References APValue(), and getArrayInitializedElt().
|
inline |
Definition at line 710 of file APValue.h.
References isArray().
Referenced by APValue(), buildConstantDataArrayFromElements(), findSubobject(), getArrayFiller(), getArrayInitializedElt(), hasArrayFiller(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), Profile(), clang::CIRGen::ConstantEmitter::tryEmitPrivate(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
|
inline |
Definition at line 714 of file APValue.h.
References isArray().
Referenced by APValue(), buildConstantDataArrayFromElements(), clang::GCCAsmStmt::ExtractStringFromGCCAsmStmtComponent(), hasArrayFiller(), clang::ASTNodeImporter::ImportAPValue(), Profile(), clang::CIRGen::ConstantEmitter::tryEmitPrivate(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
| std::string APValue::getAsString | ( | const ASTContext & | Ctx, |
| QualType | Ty ) const |
Definition at line 1099 of file APValue.cpp.
References printPretty(), and clang::Result.
Referenced by BuildConvertedConstantExpression(), checkDynamicType(), checkThreeWayNarrowingConversion(), DiagnoseNarrowingInInitList(), findCompleteObject(), HandleDestructionImpl(), isNullPointerValueTemplateArgument(), clang::interp::MemberPointer::toDiagnosticString(), and clang::interp::Pointer::toDiagnosticString().
|
inline |
Definition at line 627 of file APValue.h.
References isComplexFloat().
Referenced by APValue(), BuildExpressionFromNonTypeTemplateArgumentValue(), findSubobject(), getComplexFloatImag(), HandleConversionToBool(), IsSameFloatAfterCast(), needsCleanup(), printPretty(), Profile(), and clang::CIRGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 631 of file APValue.h.
References APValue(), and getComplexFloatImag().
|
inline |
Definition at line 619 of file APValue.h.
References isComplexFloat().
Referenced by APValue(), BuildExpressionFromNonTypeTemplateArgumentValue(), findSubobject(), getComplexFloatReal(), HandleConversionToBool(), IsSameFloatAfterCast(), needsCleanup(), printPretty(), Profile(), and clang::CIRGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 623 of file APValue.h.
References APValue(), and getComplexFloatReal().
|
inline |
Definition at line 611 of file APValue.h.
References isComplexInt().
Referenced by APValue(), BuildExpressionFromNonTypeTemplateArgumentValue(), findSubobject(), getComplexIntImag(), GetValueRange(), HandleConversionToBool(), needsCleanup(), printPretty(), Profile(), and clang::CIRGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 615 of file APValue.h.
References APValue(), and getComplexIntImag().
|
inline |
Definition at line 603 of file APValue.h.
References isComplexInt().
Referenced by APValue(), BuildExpressionFromNonTypeTemplateArgumentValue(), findSubobject(), getComplexIntReal(), GetValueRange(), HandleConversionToBool(), needsCleanup(), printPretty(), Profile(), and clang::CIRGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 607 of file APValue.h.
References APValue(), and getComplexIntReal().
|
inline |
Definition at line 595 of file APValue.h.
References isFixedPoint().
Referenced by BuildExpressionFromNonTypeTemplateArgumentValue(), EvaluateFixedPoint(), getFixedPoint(), HandleConversionToBool(), needsCleanup(), printPretty(), Profile(), and clang::CIRGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 599 of file APValue.h.
References APValue(), and getFixedPoint().
|
inline |
Definition at line 587 of file APValue.h.
References isFloat().
Referenced by BuildExpressionFromNonTypeTemplateArgumentValue(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), getFloat(), clang::StandardConversionSequence::getNarrowingKind(), handleCompareOpForVector(), HandleConversionToBool(), handleLogicalOpForVector(), handleScalarCast(), handleVectorUnaryOperator(), handleVectorVectorBinOp(), IsSameFloatAfterCast(), needsCleanup(), printPretty(), Profile(), clang::CIRGen::ConstantEmitter::tryEmitPrivate(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), and clang::interp::Compiler< Emitter >::visitAPValue().
|
inline |
Definition at line 591 of file APValue.h.
References APValue(), and getFloat().
|
inline |
Definition at line 573 of file APValue.h.
References isInt().
Referenced by clang::SemaOpenACC::ActOnArraySectionExpr(), clang::SemaOpenMP::ActOnOMPArrayShapingExpr(), clang::SemaOpenMP::ActOnOpenMPDeviceNum(), clang::SemaOpenMP::ActOnOpenMPFlattenDirective(), clang::SemaOpenMP::ActOnOpenMPTileDirective(), areEqualIntegers(), buildConstantDataArrayFromElements(), BuildExpressionFromNonTypeTemplateArgumentValue(), BuiltinAlignment(), canConvertIntToOtherIntTy(), canConvertIntTyToFloatTy(), clang::Sema::CheckAdditionOperands(), clang::SemaAMDGPU::CheckAMDGCNBuiltinFunctionCall(), clang::SemaAMDGPU::checkAtomicOrderingCABIArg(), clang::SemaOpenCL::checkBuiltinReadImage(), clang::Sema::checkCall(), checkFormatStringExpr(), clang::Sema::CheckLogicalOperands(), checkOpenMPLoop(), checkSimdlenSafelenSpecified(), clang::Sema::CheckSubtractionOperands(), CheckUnicodeArithmeticConversions(), clang::Sema::ComputeExpansionSize(), clang::CIRGen::CIRGenFunction::constantFoldsToSimpleInteger(), ConvertBoolVectorToInt(), DiagnoseBadDivideOrRemainderValues(), DiagnoseBadShiftValues(), diagnoseWellFormedUnsatisfiedConstraintExpr(), clang::CIRGen::CIRGenFunction::emitAsmInput(), emitAtomicCmpXchgFailureSet(), clang::CIRGen::CIRGenFunction::emitAtomicExprWithMemOrder(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), evalPackBuiltin(), evalShiftWithCount(), EvaluateBuiltinStrLen(), EvaluateCharRangeAsStringImpl(), EvaluateInteger(), clang::Sema::FillInlineAsmIdentifierInfo(), getInt(), GetValueRange(), handleCompareOpForVector(), HandleConversionToBool(), handleLogicalOpForVector(), handleVectorUnaryOperator(), handleVectorVectorBinOp(), isPtrBufferSafe(), isSafeArraySubscript(), isSafePointerArithmetic(), needsCleanup(), clang::InitializationSequence::Perform(), printPretty(), clang::processConstant32BitIntArgument(), Profile(), shouldAddCase(), toIntegralConstant(), clang::CIRGen::ConstantEmitter::tryEmitPrivate(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), clang::Sema::VerifyIntegerConstantExpression(), clang::interp::Compiler< Emitter >::visitAPValue(), clang::interp::Compiler< Emitter >::VisitSourceLocExpr(), and clang::interp::Compiler< Emitter >::VisitTypeTraitExpr().
|
inline |
|
inline |
Definition at line 537 of file APValue.h.
Referenced by APValue(), BuildExpressionFromNonTypeTemplateArgumentValue(), handleCompareOpForVector(), HandleConversionToBool(), handleLogicalOpForVector(), handleVectorUnaryOperator(), handleVectorVectorBinOp(), clang::ASTNodeImporter::ImportAPValue(), needsCleanup(), printPretty(), and clang::CIRGen::ConstantEmitter::tryEmitPrivate().
| const APValue::LValueBase APValue::getLValueBase | ( | ) | const |
Definition at line 1126 of file APValue.cpp.
References isLValue().
Referenced by APValue(), EvaluateBuiltinConstantPForLValue(), getLValueType(), clang::ASTNodeImporter::ImportAPValue(), isNullPointerValueTemplateArgument(), printPretty(), Profile(), toIntegralConstant(), clang::CodeGen::CodeGenFunction::tryEmitAsConstant(), clang::interp::Compiler< Emitter >::visitAPValue(), and clang::interp::Compiler< Emitter >::VisitSourceLocExpr().
| unsigned APValue::getLValueCallIndex | ( | ) | const |
Definition at line 1152 of file APValue.cpp.
References isLValue().
| CharUnits & APValue::getLValueOffset | ( | ) |
Definition at line 1136 of file APValue.cpp.
References isLValue().
Referenced by addOrSubLValueAsInteger(), APValue(), EvaluateBuiltinConstantPForLValue(), getLValueOffset(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), Profile(), toIntegralConstant(), and clang::interp::Compiler< Emitter >::visitAPValue().
|
inline |
Definition at line 637 of file APValue.h.
References APValue(), and getLValueOffset().
| ArrayRef< APValue::LValuePathEntry > APValue::getLValuePath | ( | ) | const |
Definition at line 1146 of file APValue.cpp.
References clang::APValue::LV::getPath(), hasLValuePath(), and isLValue().
Referenced by APValue(), getLValueType(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), Profile(), clang::interp::Compiler< Emitter >::visitAPValue(), and clang::interp::Compiler< Emitter >::VisitSourceLocExpr().
| unsigned APValue::getLValueVersion | ( | ) | const |
Definition at line 1157 of file APValue.cpp.
References isLValue().
Definition at line 671 of file APValue.h.
References APValue(), getMatrixNumElements(), and isMatrix().
Referenced by getMatrixElt(), getMatrixElt(), getMatrixElt(), hlslAggSplatHelper(), IsSameFloatAfterCast(), printPretty(), and Profile().
Definition at line 676 of file APValue.h.
References APValue(), and getMatrixElt().
Definition at line 679 of file APValue.h.
References APValue(), getMatrixElt(), getMatrixNumColumns(), getMatrixNumRows(), and isMatrix().
Definition at line 687 of file APValue.h.
References APValue(), and getMatrixElt().
|
inline |
Definition at line 664 of file APValue.h.
References isMatrix().
Referenced by APValue(), getMatrixElt(), getMatrixNumElements(), printPretty(), and Profile().
|
inline |
Definition at line 668 of file APValue.h.
References getMatrixNumColumns(), and getMatrixNumRows().
Referenced by getMatrixElt(), and IsSameFloatAfterCast().
|
inline |
Definition at line 660 of file APValue.h.
References isMatrix().
Referenced by APValue(), getMatrixElt(), getMatrixNumElements(), printPretty(), and Profile().
| const ValueDecl * APValue::getMemberPointerDecl | ( | ) | const |
Definition at line 1209 of file APValue.cpp.
References isMemberPointer().
Referenced by APValue(), clang::ASTContext::getMemberPointerPathAdjustment(), HandleConversionToBool(), clang::ASTNodeImporter::ImportAPValue(), isNullPointerValueTemplateArgument(), printPretty(), Profile(), clang::CIRGen::ConstantEmitter::tryEmitPrivate(), and clang::interp::Compiler< Emitter >::visitAPValue().
| ArrayRef< const CXXRecordDecl * > APValue::getMemberPointerPath | ( | ) | const |
Definition at line 1223 of file APValue.cpp.
References clang::APValue::MemberPointerData::getPath(), and isMemberPointer().
Referenced by APValue(), clang::ASTContext::getMemberPointerPathAdjustment(), clang::ASTNodeImporter::ImportAPValue(), Profile(), and clang::interp::Compiler< Emitter >::visitAPValue().
|
inline |
Definition at line 787 of file APValue.h.
References isReflection().
Referenced by APValue(), BuildExpressionFromReflection(), clang::ASTNodeImporter::ImportAPValue(), and printPretty().
|
inline |
Definition at line 782 of file APValue.h.
References isReflection().
Referenced by APValue(), clang::ASTNodeImporter::ImportAPValue(), and printPretty().
Definition at line 731 of file APValue.h.
References APValue(), getStructNumBases(), and isStruct().
Referenced by APValue(), findSubobject(), getStructBase(), printPretty(), Profile(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
Definition at line 747 of file APValue.h.
References APValue(), and getStructBase().
Definition at line 736 of file APValue.h.
References APValue(), getStructNumBases(), getStructNumFields(), and isStruct().
Referenced by APValue(), findSubobject(), clang::MSGuidDecl::getAsAPValue(), getStructField(), printPretty(), Profile(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
Definition at line 750 of file APValue.h.
References APValue(), and getStructField().
|
inline |
Definition at line 719 of file APValue.h.
References isStruct().
Referenced by APValue(), findSubobject(), getStructBase(), getStructField(), getStructVirtualBase(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), Profile(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
|
inline |
Definition at line 723 of file APValue.h.
References isStruct().
Referenced by APValue(), getStructField(), getStructVirtualBase(), clang::ASTNodeImporter::ImportAPValue(), Profile(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
|
inline |
Definition at line 727 of file APValue.h.
References isStruct().
Referenced by APValue(), getStructVirtualBase(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), Profile(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
Definition at line 741 of file APValue.h.
References APValue(), getStructNumBases(), getStructNumFields(), getStructNumVirtualBases(), and isStruct().
Referenced by APValue(), findSubobject(), getStructVirtualBase(), printPretty(), Profile(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
Definition at line 753 of file APValue.h.
References APValue(), and getStructVirtualBase().
|
inline |
Definition at line 757 of file APValue.h.
References isUnion().
Referenced by APValue(), findSubobject(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), Profile(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
|
inline |
Definition at line 761 of file APValue.h.
References APValue(), and isUnion().
Referenced by APValue(), findSubobject(), getUnionValue(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), Profile(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
|
inline |
Definition at line 765 of file APValue.h.
References APValue(), and getUnionValue().
Definition at line 647 of file APValue.h.
References APValue(), getVectorLength(), and isVector().
Referenced by BuildExpressionFromNonTypeTemplateArgumentValue(), ConvertBoolVectorToInt(), evalPackBuiltin(), evalShiftWithCount(), evalShuffleGeneric(), findSubobject(), GetValueRange(), getVectorElt(), handleVectorShuffle(), handleVectorVectorBinOp(), hlslAggSplatHelper(), IsSameFloatAfterCast(), printPretty(), Profile(), and clang::CIRGen::ConstantEmitter::tryEmitPrivate().
Definition at line 652 of file APValue.h.
References APValue(), and getVectorElt().
|
inline |
Definition at line 655 of file APValue.h.
References isVector().
Referenced by APValue(), BuildExpressionFromNonTypeTemplateArgumentValue(), ConvertBoolVectorToInt(), evalPackBuiltin(), GetValueRange(), getVectorElt(), handleVectorShuffle(), handleVectorVectorBinOp(), hlslAggSplatHelper(), clang::ASTNodeImporter::ImportAPValue(), IsSameFloatAfterCast(), printPretty(), Profile(), and clang::CIRGen::ConstantEmitter::tryEmitPrivate().
|
inline |
Definition at line 699 of file APValue.h.
References getArrayInitializedElts(), and getArraySize().
Referenced by APValue(), buildConstantDataArrayFromElements(), expandArray(), getArrayFiller(), Profile(), and clang::CIRGen::ConstantEmitter::tryEmitPrivate().
| bool APValue::hasLValuePath | ( | ) | const |
Definition at line 1141 of file APValue.cpp.
References isLValue().
Referenced by addOrSubLValueAsInteger(), APValue(), getLValuePath(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), Profile(), and clang::interp::Compiler< Emitter >::visitAPValue().
|
inline |
Definition at line 547 of file APValue.h.
References Indeterminate, and None.
Referenced by CheckEvaluationResult(), clang::Sema::CheckForImmediateInvocation(), getBuiltinAlignArguments(), and HandleLambdaCapture().
|
inlinestatic |
Definition at line 508 of file APValue.h.
References APValue(), Indeterminate, and clang::Result.
Referenced by expandVector(), clang::ConstantExpr::getAPValueResult(), and handleDefaultInitValue().
|
inline |
Definition at line 545 of file APValue.h.
References None.
Referenced by clang::Sema::EvaluateConvertedConstantExpression(), findSubobject(), clang::CIRGen::CIRGenModule::getAddrOfUnnamedGlobalConstantDecl(), and clang::VarDecl::getEvaluatedValue().
|
inline |
Definition at line 561 of file APValue.h.
References AddrLabelDiff.
Referenced by getAddrLabelDiffLHS(), getAddrLabelDiffRHS(), and GetValueRange().
|
inline |
Definition at line 557 of file APValue.h.
References Array.
Referenced by clang::GCCAsmStmt::ExtractStringFromGCCAsmStmtComponent(), getArrayFiller(), getArrayInitializedElt(), getArrayInitializedElts(), getArraySize(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
|
inline |
Definition at line 553 of file APValue.h.
References ComplexFloat.
Referenced by findSubobject(), getComplexFloatImag(), getComplexFloatReal(), IsSameFloatAfterCast(), and setComplexFloat().
|
inline |
Definition at line 552 of file APValue.h.
References ComplexInt.
Referenced by findSubobject(), getComplexIntImag(), getComplexIntReal(), GetValueRange(), and setComplexInt().
|
inline |
Definition at line 551 of file APValue.h.
References FixedPoint.
Referenced by EvaluateFixedPoint(), getFixedPoint(), and setFixedPoint().
|
inline |
Definition at line 550 of file APValue.h.
References Float.
Referenced by clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), getFloat(), clang::StandardConversionSequence::getNarrowingKind(), hlslAggSplatHelper(), IsSameFloatAfterCast(), setFloat(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), and clang::interp::Compiler< Emitter >::visitAPValue().
|
inline |
Definition at line 546 of file APValue.h.
References Indeterminate.
Referenced by expandVector(), findSubobject(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), clang::interp::Compiler< Emitter >::visitAPValue(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
|
inline |
Definition at line 549 of file APValue.h.
References Int.
Referenced by BuildConvertedConstantExpression(), CheckEvalInICE(), ConvertBoolVectorToInt(), clang::CIRGen::CIRGenFunction::emitBuiltinExpr(), EvaluateBuiltinStrLen(), clang::Sema::EvaluateConvertedConstantExpression(), EvaluateInteger(), getInt(), GetValueRange(), hlslAggSplatHelper(), clang::processConstant32BitIntArgument(), setInt(), shouldAddCase(), toIntegralConstant(), clang::CodeGen::ConstantEmitter::tryEmitPrivate(), clang::Sema::VerifyIntegerConstantExpression(), clang::interp::Compiler< Emitter >::visitAPValue(), and clang::interp::Compiler< Emitter >::VisitSourceLocExpr().
|
inline |
Definition at line 554 of file APValue.h.
References LValue.
Referenced by EvaluateArgs(), FastEvaluateAsRValue(), getLValueBase(), getLValueCallIndex(), getLValueOffset(), getLValuePath(), getLValueVersion(), GetValueRange(), handleVectorVectorBinOp(), hasLValuePath(), hlslElementwiseCastHelper(), isLValueOnePastTheEnd(), isNullPointer(), isNullPointerValueTemplateArgument(), clang::InitializationSequence::Perform(), setLValue(), toIntegralConstant(), clang::CodeGen::CodeGenFunction::tryEmitAsConstant(), clang::interp::Compiler< Emitter >::visitAPValue(), and clang::interp::Compiler< Emitter >::VisitSourceLocExpr().
| bool APValue::isLValueOnePastTheEnd | ( | ) | const |
Definition at line 1131 of file APValue.cpp.
References isLValue().
Referenced by APValue(), clang::ASTNodeImporter::ImportAPValue(), printPretty(), and Profile().
|
inline |
Definition at line 556 of file APValue.h.
References Matrix.
Referenced by getMatrixElt(), getMatrixElt(), getMatrixNumColumns(), getMatrixNumRows(), hlslAggSplatHelper(), and IsSameFloatAfterCast().
|
inline |
Definition at line 560 of file APValue.h.
References MemberPointer.
Referenced by getMemberPointerDecl(), getMemberPointerPath(), isMemberPointerToDerivedMember(), isNullPointerValueTemplateArgument(), and clang::interp::Compiler< Emitter >::visitAPValue().
| bool APValue::isMemberPointerToDerivedMember | ( | ) | const |
Definition at line 1216 of file APValue.cpp.
References isMemberPointer().
Referenced by APValue(), clang::ASTContext::getMemberPointerPathAdjustment(), clang::ASTNodeImporter::ImportAPValue(), Profile(), and clang::interp::Compiler< Emitter >::visitAPValue().
| bool APValue::isNullPointer | ( | ) | const |
Definition at line 1162 of file APValue.cpp.
References isLValue().
Referenced by APValue(), clang::ASTNodeImporter::ImportAPValue(), isNullPointerValueTemplateArgument(), clang::InitializationSequence::Perform(), printPretty(), Profile(), toIntegralConstant(), and clang::interp::Compiler< Emitter >::visitAPValue().
|
inline |
Definition at line 562 of file APValue.h.
References Reflection.
Referenced by getReflectionOpaqueOperand(), and getReflectionOperandKind().
|
inline |
Definition at line 558 of file APValue.h.
References Struct.
Referenced by getStructBase(), getStructField(), getStructNumBases(), getStructNumFields(), getStructNumVirtualBases(), getStructVirtualBase(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
|
inline |
Definition at line 559 of file APValue.h.
References Union.
Referenced by getUnionField(), getUnionValue(), setUnion(), and clang::interp::Compiler< Emitter >::visitAPValueInitializer().
|
inline |
Definition at line 555 of file APValue.h.
References Vector.
Referenced by ConvertBoolVectorToInt(), findSubobject(), GetValueRange(), handleVectorVectorBinOp(), hlslAggSplatHelper(), and IsSameFloatAfterCast().
| bool APValue::needsCleanup | ( | ) | const |
Returns whether the object performed allocations.
If APValues are constructed via placement new, needsCleanup() indicates whether the destructor must be called in order to correctly free all allocated memory.
Definition at line 500 of file APValue.cpp.
References AddrLabelDiff, Array, ComplexFloat, ComplexInt, FixedPoint, Float, getComplexFloatImag(), getComplexFloatReal(), getComplexIntImag(), getComplexIntReal(), getFixedPoint(), getFloat(), getInt(), getKind(), Indeterminate, Int, LValue, Matrix, MemberPointer, needsCleanup(), None, Reflection, Struct, Union, and Vector.
Referenced by needsCleanup(), and clang::ASTDeclReader::ReadVarDeclInit().
Definition at line 455 of file APValue.cpp.
References APValue(), Indeterminate, and None.
Definition at line 448 of file APValue.cpp.
References APValue().
| void APValue::printPretty | ( | raw_ostream & | OS, |
| const ASTContext & | Ctx, | ||
| QualType | Ty ) const |
Definition at line 810 of file APValue.cpp.
References clang::ASTContext::getPrintingPolicy(), and printPretty().
Referenced by DiagTemplateArg(), getAsString(), clang::TemplateArgument::print(), clang::TemplateParamObjectDecl::printAsInit(), printPretty(), and printPretty().
| void APValue::printPretty | ( | raw_ostream & | OS, |
| const PrintingPolicy & | Policy, | ||
| QualType | Ty, | ||
| const ASTContext * | Ctx = nullptr ) const |
Definition at line 815 of file APValue.cpp.
References AddrLabelDiff, Array, clang::CXXRecordDecl::bases_begin(), clang::CXXRecordDecl::bases_end(), clang::C, clang::cast(), clang::Type::castAs(), clang::Type::castAsArrayTypeUnsafe(), clang::Type::castAsRecordDecl(), ComplexFloat, ComplexInt, clang::PrintingPolicy::EntireContentsOfLargeArray, FixedPoint, Float, getAddrLabelDiffLHS(), getAddrLabelDiffRHS(), GetApproxValue(), getArrayInitializedElt(), getArrayInitializedElts(), clang::Type::getAs(), getComplexFloatImag(), getComplexFloatReal(), getComplexIntImag(), getComplexIntReal(), clang::ArrayType::getElementType(), getFixedPoint(), getFloat(), getInt(), getKind(), clang::AddrLabelExpr::getLabel(), getLValueBase(), getLValueOffset(), getLValuePath(), getMatrixElt(), getMatrixNumColumns(), getMatrixNumRows(), getMemberPointerDecl(), clang::NamedDecl::getName(), clang::QualType::getNonReferenceType(), clang::Type::getPointeeType(), clang::CharUnits::getQuantity(), getReflectionOpaqueOperand(), getReflectionOperandKind(), getStructBase(), getStructField(), getStructNumBases(), getStructNumVirtualBases(), getStructVirtualBase(), clang::CXXBaseSpecifier::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeSizeInCharsIfKnown(), getUnionField(), getUnionValue(), getVectorElt(), getVectorLength(), hasLValuePath(), Indeterminate, Int, clang::Type::isAnyComplexType(), clang::Type::isBooleanType(), isLValueOnePastTheEnd(), clang::CharUnits::isMultipleOf(), clang::QualType::isNull(), isNullPointer(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::Type::isVoidType(), clang::CharUnits::isZero(), LValue, Matrix, MemberPointer, None, clang::Null, clang::PrintingPolicy::Nullptr, clang::CharUnits::One(), printPretty(), clang::Stmt::printPretty(), Reflection, clang::QualType::stream(), Struct, TryPrintAsStringLiteral(), clang::Type, Union, clang::CXXRecordDecl::vbases_begin(), clang::CXXRecordDecl::vbases_end(), Vector, and clang::CharUnits::Zero().
| void APValue::Profile | ( | llvm::FoldingSetNodeID & | ID | ) | const |
profile this value.
There is no guarantee that values of different types will not produce the same profiled value, so the type should typically also be profiled if it's not implied by the context.
Definition at line 585 of file APValue.cpp.
References AddrLabelDiff, Array, clang::C, ComplexFloat, ComplexInt, FixedPoint, Float, getAddrLabelDiffLHS(), getAddrLabelDiffRHS(), getArrayFiller(), getArrayInitializedElt(), getArrayInitializedElts(), getArraySize(), getCanonicalDecl(), getComplexFloatImag(), getComplexFloatReal(), getComplexIntImag(), getComplexIntReal(), getFixedPoint(), getFloat(), getInt(), getLValueBase(), getLValueOffset(), getLValuePath(), getMatrixElt(), getMatrixNumColumns(), getMatrixNumRows(), getMemberPointerDecl(), getMemberPointerPath(), getStructBase(), getStructField(), getStructNumBases(), getStructNumFields(), getStructNumVirtualBases(), getStructVirtualBase(), getUnionField(), getUnionValue(), getVectorElt(), getVectorLength(), hasArrayFiller(), hasLValuePath(), Indeterminate, Int, isLValueOnePastTheEnd(), isMemberPointerToDerivedMember(), isNullPointer(), LValue, Matrix, MemberPointer, None, clang::APValue::LValueBase::Profile(), Profile(), profileIntValue(), profileReflection(), Reflection, Struct, Union, and Vector.
Referenced by EvaluateComparisonBinaryOperator(), Profile(), clang::TemplateArgument::Profile(), clang::UnnamedGlobalConstantDecl::Profile(), and clang::TemplateArgument::structurallyEquals().
|
inline |
|
inline |
Definition at line 821 of file APValue.h.
References isComplexFloat().
Definition at line 814 of file APValue.h.
References isComplexInt().
|
inline |
Definition at line 800 of file APValue.h.
References isFixedPoint().
|
inline |
|
inline |
| void APValue::setLValue | ( | LValueBase | B, |
| CharUnits | O, | ||
| ArrayRef< LValuePathEntry > | Path, | ||
| bool | OnePastTheEnd, | ||
| bool | IsNullPtr ) |
Definition at line 1191 of file APValue.cpp.
References memcpy().
| void APValue::setLValue | ( | LValueBase | B, |
| CharUnits | O, | ||
| NoLValuePath | , | ||
| bool | IsNullPtr ) |
Definition at line 1167 of file APValue.cpp.
References isLValue(), and clang::APValue::LV::resizePath().
Referenced by APValue(), APValue(), APValue(), and APValue().
Definition at line 1202 of file APValue.cpp.
References APValue(), and isUnion().
Referenced by APValue(), APValue(), and findSubobject().
| void APValue::swap | ( | APValue & | RHS | ) |
Swaps the contents of this and the given APValue.
Definition at line 539 of file APValue.cpp.
References APValue().
Referenced by expandArray().
| bool APValue::toIntegralConstant | ( | APSInt & | Result, |
| QualType | SrcTy, | ||
| const ASTContext & | Ctx ) const |
Try to convert this value to an integral constant.
This works if it's an integer, null pointer, or offset from a null pointer. Returns true on success.
Definition at line 1106 of file APValue.cpp.
References getInt(), getLValueBase(), getLValueOffset(), clang::ASTContext::getTargetNullPointerValue(), isInt(), isLValue(), isNullPointer(), clang::ASTContext::MakeIntValue(), and clang::Result.
Referenced by clang::Sema::ActOnGCCAsmStmt(), and clang::CIRGen::CIRGenFunction::emitAsmInput().
Visit this value and every recursively nested value.
Iteration order is unspecified.
Visitation stops if Visitor returns false.
Definition at line 81 of file APValue.cpp.
References APValue(), and visitAPValue().
|
friend |
|
friend |
Definition at line 293 of file APValue.h.
References ASTNodeImporter.
Referenced by ASTNodeImporter.
|
friend |