Lines Matching defs:APValue

1 //===--- APValue.cpp - Union class for APFloat/APSInt/Complex -------------===//
9 // This file implements the APValue class.
13 #include "clang/AST/APValue.h"
42 APValue::LValueBase::LValueBase(const ValueDecl *P, unsigned I, unsigned V)
44 APValue::LValueBase::LValueBase(const Expr *P, unsigned I, unsigned V)
47 APValue::LValueBase APValue::LValueBase::getDynamicAlloc(DynamicAllocLValue LV,
55 APValue::LValueBase APValue::LValueBase::getTypeInfo(TypeInfoLValue LV,
63 QualType APValue::LValueBase::getType() const {
108 unsigned APValue::LValueBase::getCallIndex() const {
113 unsigned APValue::LValueBase::getVersion() const {
117 QualType APValue::LValueBase::getTypeInfoType() const {
122 QualType APValue::LValueBase::getDynamicAllocType() const {
127 void APValue::LValueBase::Profile(llvm::FoldingSetNodeID &ID) const {
136 bool operator==(const APValue::LValueBase &LHS,
137 const APValue::LValueBase &RHS) {
147 APValue::LValuePathEntry::LValuePathEntry(BaseOrMemberType BaseOrMember) {
153 void APValue::LValuePathEntry::Profile(llvm::FoldingSetNodeID &ID) const {
157 APValue::LValuePathSerializationHelper::LValuePathSerializationHelper(
161 QualType APValue::LValuePathSerializationHelper::getType() {
167 APValue::LValueBase Base;
175 void *APValue::LValueBase::getOpaqueValue() const {
179 bool APValue::LValueBase::isNull() const {
183 APValue::LValueBase::operator bool () const {
187 clang::APValue::LValueBase
188 llvm::DenseMapInfo<clang::APValue::LValueBase>::getEmptyKey() {
189 clang::APValue::LValueBase B;
194 clang::APValue::LValueBase
195 llvm::DenseMapInfo<clang::APValue::LValueBase>::getTombstoneKey() {
196 clang::APValue::LValueBase B;
202 llvm::hash_code hash_value(const APValue::LValueBase &Base) {
210 unsigned llvm::DenseMapInfo<clang::APValue::LValueBase>::getHashValue(
211 const clang::APValue::LValueBase &Base) {
215 bool llvm::DenseMapInfo<clang::APValue::LValueBase>::isEqual(
216 const clang::APValue::LValueBase &LHS,
217 const clang::APValue::LValueBase &RHS) {
221 struct APValue::LV : LVBase {
262 struct APValue::MemberPointerData : MemberPointerBase {
294 APValue::Arr::Arr(unsigned NumElts, unsigned Size) :
295 Elts(new APValue[NumElts + (NumElts != Size ? 1 : 0)]),
297 APValue::Arr::~Arr() { delete [] Elts; }
299 APValue::StructData::StructData(unsigned NumBases, unsigned NumFields) :
300 Elts(new APValue[NumBases+NumFields]),
302 APValue::StructData::~StructData() {
306 APValue::UnionData::UnionData() : Field(nullptr), Value(new APValue) {}
307 APValue::UnionData::~UnionData () {
311 APValue::APValue(const APValue &RHS)
383 APValue::APValue(APValue &&RHS)
389 APValue &APValue::operator=(const APValue &RHS) {
391 *this = APValue(RHS);
397 APValue &APValue::operator=(APValue &&RHS) {
409 void APValue::DestroyDataAndMakeUninit() {
438 bool APValue::needsCleanup() const {
472 llvm_unreachable("Unknown APValue kind!");
475 void APValue::swap(APValue &RHS) {
490 void APValue::Profile(llvm::FoldingSetNodeID &ID) const {
630 llvm_unreachable("Unknown APValue kind!");
644 ArrayRef<APValue> Inits) {
704 void APValue::printPretty(raw_ostream &Out, const ASTContext &Ctx,
709 void APValue::printPretty(raw_ostream &Out, const PrintingPolicy &Policy,
722 case APValue::None:
725 case APValue::Indeterminate:
728 case APValue::Int:
734 case APValue::Float:
737 case APValue::FixedPoint:
740 case APValue::Vector: {
751 case APValue::ComplexInt:
754 case APValue::ComplexFloat:
758 case APValue::LValue: {
879 case APValue::Array: {
904 case APValue::Struct: {
931 case APValue::Union:
939 case APValue::MemberPointer:
948 case APValue::AddrLabelDiff:
954 llvm_unreachable("Unknown APValue kind!");
957 std::string APValue::getAsString(const ASTContext &Ctx, QualType Ty) const {
964 bool APValue::toIntegralConstant(APSInt &Result, QualType SrcTy,
984 const APValue::LValueBase APValue::getLValueBase() const {
989 bool APValue::isLValueOnePastTheEnd() const {
994 CharUnits &APValue::getLValueOffset() {
999 bool APValue::hasLValuePath() const {
1004 ArrayRef<APValue::LValuePathEntry> APValue::getLValuePath() const {
1010 unsigned APValue::getLValueCallIndex() const {
1015 unsigned APValue::getLValueVersion() const {
1020 bool APValue::isNullPointer() const {
1025 void APValue::setLValue(LValueBase B, const CharUnits &O, NoLValuePath,
1036 MutableArrayRef<APValue::LValuePathEntry>
1037 APValue::setLValueUninit(LValueBase B, const CharUnits &O, unsigned Size,
1049 void APValue::setLValue(LValueBase B, const CharUnits &O,
1052 MutableArrayRef<APValue::LValuePathEntry> InternalPath =
1060 void APValue::setUnion(const FieldDecl *Field, const APValue &Value) {
1067 const ValueDecl *APValue::getMemberPointerDecl() const {
1074 bool APValue::isMemberPointerToDerivedMember() const {
1081 ArrayRef<const CXXRecordDecl*> APValue::getMemberPointerPath() const {
1088 void APValue::MakeLValue() {
1095 void APValue::MakeArray(unsigned InitElts, unsigned Size) {
1102 APValue::setMemberPointerUninit(const ValueDecl *Member, bool IsDerivedMember,
1114 void APValue::MakeMemberPointer(const ValueDecl *Member, bool IsDerivedMember,
1122 LinkageInfo LinkageComputer::getLVForValue(const APValue &V,
1130 auto Merge = [&](const APValue &V) {
1135 case APValue::None:
1136 case APValue::Indeterminate:
1137 case APValue::Int:
1138 case APValue::Float:
1139 case APValue::FixedPoint:
1140 case APValue::ComplexInt:
1141 case APValue::ComplexFloat:
1142 case APValue::Vector:
1145 case APValue::AddrLabelDiff:
1150 case APValue::Struct: {
1160 case APValue::Union:
1165 case APValue::Array: {
1174 case APValue::LValue: {
1206 case APValue::MemberPointer: