Home | History | Annotate | Download | only in AST

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) {
401 void APValue::DestroyDataAndMakeUninit() {
429 bool APValue::needsCleanup() const {
463 llvm_unreachable("Unknown APValue kind!");
466 void APValue::swap(APValue &RHS) {
477 void APValue::Profile(llvm::FoldingSetNodeID &ID) const {
617 llvm_unreachable("Unknown APValue kind!");
628 void APValue::printPretty(raw_ostream &Out, const ASTContext &Ctx,
633 void APValue::printPretty(raw_ostream &Out, const PrintingPolicy &Policy,
643 case APValue::None:
646 case APValue::Indeterminate:
649 case APValue::Int:
655 case APValue::Float:
658 case APValue::FixedPoint:
661 case APValue::Vector: {
672 case APValue::ComplexInt:
675 case APValue::ComplexFloat:
679 case APValue::LValue: {
794 case APValue::Array: {
813 case APValue::Struct: {
839 case APValue::Union:
847 case APValue::MemberPointer:
856 case APValue::AddrLabelDiff:
862 llvm_unreachable("Unknown APValue kind!");
865 std::string APValue::getAsString(const ASTContext &Ctx, QualType Ty) const {
873 bool APValue::toIntegralConstant(APSInt &Result, QualType SrcTy,
893 const APValue::LValueBase APValue::getLValueBase() const {
898 bool APValue::isLValueOnePastTheEnd() const {
903 CharUnits &APValue::getLValueOffset() {
908 bool APValue::hasLValuePath() const {
913 ArrayRef<APValue::LValuePathEntry> APValue::getLValuePath() const {
919 unsigned APValue::getLValueCallIndex() const {
924 unsigned APValue::getLValueVersion() const {
929 bool APValue::isNullPointer() const {
934 void APValue::setLValue(LValueBase B, const CharUnits &O, NoLValuePath,
945 MutableArrayRef<APValue::LValuePathEntry>
946 APValue::setLValueUninit(LValueBase B, const CharUnits &O, unsigned Size,
958 void APValue::setLValue(LValueBase B, const CharUnits &O,
961 MutableArrayRef<APValue::LValuePathEntry> InternalPath =
969 void APValue::setUnion(const FieldDecl *Field, const APValue &Value) {
976 const ValueDecl *APValue::getMemberPointerDecl() const {
983 bool APValue::isMemberPointerToDerivedMember() const {
990 ArrayRef<const CXXRecordDecl*> APValue::getMemberPointerPath() const {
997 void APValue::MakeLValue() {
1004 void APValue::MakeArray(unsigned InitElts, unsigned Size) {
1010 MutableArrayRef<APValue::LValuePathEntry>
1011 setLValueUninit(APValue::LValueBase B, const CharUnits &O, unsigned Size,
1015 APValue::setMemberPointerUninit(const ValueDecl *Member, bool IsDerivedMember,
1027 void APValue::MakeMemberPointer(const ValueDecl *Member, bool IsDerivedMember,
1035 LinkageInfo LinkageComputer::getLVForValue(const APValue &V,
1043 auto Merge = [&](const APValue &V) {
1048 case APValue::None:
1049 case APValue::Indeterminate:
1050 case APValue::Int:
1051 case APValue::Float:
1052 case APValue::FixedPoint:
1053 case APValue::ComplexInt:
1054 case APValue::ComplexFloat:
1055 case APValue::Vector:
1058 case APValue::AddrLabelDiff:
1063 case APValue::Struct: {
1073 case APValue::Union:
1078 case APValue::Array: {
1087 case APValue::LValue: {
1119 case APValue::MemberPointer: