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) : Kind(None) {
382 APValue::APValue(APValue &&RHS) : Kind(RHS.Kind), Data(RHS.Data) {
386 APValue &APValue::operator=(const APValue &RHS) {
388 *this = APValue(RHS);
392 APValue &APValue::operator=(APValue &&RHS) {
403 void APValue::DestroyDataAndMakeUninit() {
431 bool APValue::needsCleanup() const {
465 llvm_unreachable("Unknown APValue kind!");
468 void APValue::swap(APValue &RHS) {
479 void APValue::Profile(llvm::FoldingSetNodeID &ID) const {
619 llvm_unreachable("Unknown APValue kind!");
633 ArrayRef<APValue> Inits) {
693 void APValue::printPretty(raw_ostream &Out, const ASTContext &Ctx,
698 void APValue::printPretty(raw_ostream &Out, const PrintingPolicy &Policy,
711 case APValue::None:
714 case APValue::Indeterminate:
717 case APValue::Int:
723 case APValue::Float:
726 case APValue::FixedPoint:
729 case APValue::Vector: {
740 case APValue::ComplexInt:
743 case APValue::ComplexFloat:
747 case APValue::LValue: {
868 case APValue::Array: {
893 case APValue::Struct: {
920 case APValue::Union:
928 case APValue::MemberPointer:
937 case APValue::AddrLabelDiff:
943 llvm_unreachable("Unknown APValue kind!");
946 std::string APValue::getAsString(const ASTContext &Ctx, QualType Ty) const {
954 bool APValue::toIntegralConstant(APSInt &Result, QualType SrcTy,
974 const APValue::LValueBase APValue::getLValueBase() const {
979 bool APValue::isLValueOnePastTheEnd() const {
984 CharUnits &APValue::getLValueOffset() {
989 bool APValue::hasLValuePath() const {
994 ArrayRef<APValue::LValuePathEntry> APValue::getLValuePath() const {
1000 unsigned APValue::getLValueCallIndex() const {
1005 unsigned APValue::getLValueVersion() const {
1010 bool APValue::isNullPointer() const {
1015 void APValue::setLValue(LValueBase B, const CharUnits &O, NoLValuePath,
1026 MutableArrayRef<APValue::LValuePathEntry>
1027 APValue::setLValueUninit(LValueBase B, const CharUnits &O, unsigned Size,
1039 void APValue::setLValue(LValueBase B, const CharUnits &O,
1042 MutableArrayRef<APValue::LValuePathEntry> InternalPath =
1050 void APValue::setUnion(const FieldDecl *Field, const APValue &Value) {
1057 const ValueDecl *APValue::getMemberPointerDecl() const {
1064 bool APValue::isMemberPointerToDerivedMember() const {
1071 ArrayRef<const CXXRecordDecl*> APValue::getMemberPointerPath() const {
1078 void APValue::MakeLValue() {
1085 void APValue::MakeArray(unsigned InitElts, unsigned Size) {
1091 MutableArrayRef<APValue::LValuePathEntry>
1092 setLValueUninit(APValue::LValueBase B, const CharUnits &O, unsigned Size,
1096 APValue::setMemberPointerUninit(const ValueDecl *Member, bool IsDerivedMember,
1108 void APValue::MakeMemberPointer(const ValueDecl *Member, bool IsDerivedMember,
1116 LinkageInfo LinkageComputer::getLVForValue(const APValue &V,
1124 auto Merge = [&](const APValue &V) {
1129 case APValue::None:
1130 case APValue::Indeterminate:
1131 case APValue::Int:
1132 case APValue::Float:
1133 case APValue::FixedPoint:
1134 case APValue::ComplexInt:
1135 case APValue::ComplexFloat:
1136 case APValue::Vector:
1139 case APValue::AddrLabelDiff:
1144 case APValue::Struct: {
1154 case APValue::Union:
1159 case APValue::Array: {
1168 case APValue::LValue: {
1200 case APValue::MemberPointer: