llvm/clang/lib/AST/APValue.cpp

//===--- APValue.cpp - Union class for APFloat/APSInt/Complex -------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
//  This file implements the APValue class.
//
//===----------------------------------------------------------------------===//

#include "clang/AST/APValue.h"
#include "Linkage.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/CharUnits.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/Expr.h"
#include "clang/AST/ExprCXX.h"
#include "clang/AST/Type.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
usingnamespaceclang;

/// The identity of a type_info object depends on the canonical unqualified
/// type only.
TypeInfoLValue::TypeInfoLValue(const Type *T)
    :{}

void TypeInfoLValue::print(llvm::raw_ostream &Out,
                           const PrintingPolicy &Policy) const {}

static_assert;

APValue::LValueBase::LValueBase(const ValueDecl *P, unsigned I, unsigned V)
    :{}
APValue::LValueBase::LValueBase(const Expr *P, unsigned I, unsigned V)
    :{}

APValue::LValueBase APValue::LValueBase::getDynamicAlloc(DynamicAllocLValue LV,
                                                         QualType Type) {}

APValue::LValueBase APValue::LValueBase::getTypeInfo(TypeInfoLValue LV,
                                                     QualType TypeInfo) {}

QualType APValue::LValueBase::getType() const {}

unsigned APValue::LValueBase::getCallIndex() const {}

unsigned APValue::LValueBase::getVersion() const {}

QualType APValue::LValueBase::getTypeInfoType() const {}

QualType APValue::LValueBase::getDynamicAllocType() const {}

void APValue::LValueBase::Profile(llvm::FoldingSetNodeID &ID) const {}

namespace clang {
bool operator==(const APValue::LValueBase &LHS,
                const APValue::LValueBase &RHS) {}
}

APValue::LValuePathEntry::LValuePathEntry(BaseOrMemberType BaseOrMember) {}

void APValue::LValuePathEntry::Profile(llvm::FoldingSetNodeID &ID) const {}

APValue::LValuePathSerializationHelper::LValuePathSerializationHelper(
    ArrayRef<LValuePathEntry> Path, QualType ElemTy)
    :{}

QualType APValue::LValuePathSerializationHelper::getType() {}

namespace {
  struct LVBase {};
}

void *APValue::LValueBase::getOpaqueValue() const {}

bool APValue::LValueBase::isNull() const {}

operator bool()

clang::APValue::LValueBase
llvm::DenseMapInfo<clang::APValue::LValueBase>::getEmptyKey() {}

clang::APValue::LValueBase
llvm::DenseMapInfo<clang::APValue::LValueBase>::getTombstoneKey() {}

namespace clang {
llvm::hash_code hash_value(const APValue::LValueBase &Base) {}
}

unsigned llvm::DenseMapInfo<clang::APValue::LValueBase>::getHashValue(
    const clang::APValue::LValueBase &Base) {}

bool llvm::DenseMapInfo<clang::APValue::LValueBase>::isEqual(
    const clang::APValue::LValueBase &LHS,
    const clang::APValue::LValueBase &RHS) {}

struct APValue::LV : LVBase {};

namespace {
  struct MemberPointerBase {};
}

struct APValue::MemberPointerData : MemberPointerBase {};

// FIXME: Reduce the malloc traffic here.

APValue::Arr::Arr(unsigned NumElts, unsigned Size) :{}
APValue::Arr::~Arr() {}

APValue::StructData::StructData(unsigned NumBases, unsigned NumFields) :{}
APValue::StructData::~StructData() {}

APValue::UnionData::UnionData() :{}
APValue::UnionData::~UnionData () {}

APValue::APValue(const APValue &RHS) :{}

APValue::APValue(APValue &&RHS) :{}

APValue &APValue::operator=(const APValue &RHS) {}

APValue &APValue::operator=(APValue &&RHS) {}

void APValue::DestroyDataAndMakeUninit() {}

bool APValue::needsCleanup() const {}

void APValue::swap(APValue &RHS) {}

/// Profile the value of an APInt, excluding its bit-width.
static void profileIntValue(llvm::FoldingSetNodeID &ID, const llvm::APInt &V) {}

void APValue::Profile(llvm::FoldingSetNodeID &ID) const {}

static double GetApproxValue(const llvm::APFloat &F) {}

static bool TryPrintAsStringLiteral(raw_ostream &Out,
                                    const PrintingPolicy &Policy,
                                    const ArrayType *ATy,
                                    ArrayRef<APValue> Inits) {}

void APValue::printPretty(raw_ostream &Out, const ASTContext &Ctx,
                          QualType Ty) const {}

void APValue::printPretty(raw_ostream &Out, const PrintingPolicy &Policy,
                          QualType Ty, const ASTContext *Ctx) const {}

std::string APValue::getAsString(const ASTContext &Ctx, QualType Ty) const {}

bool APValue::toIntegralConstant(APSInt &Result, QualType SrcTy,
                                 const ASTContext &Ctx) const {}

const APValue::LValueBase APValue::getLValueBase() const {}

bool APValue::isLValueOnePastTheEnd() const {}

CharUnits &APValue::getLValueOffset() {}

bool APValue::hasLValuePath() const {}

ArrayRef<APValue::LValuePathEntry> APValue::getLValuePath() const {}

unsigned APValue::getLValueCallIndex() const {}

unsigned APValue::getLValueVersion() const {}

bool APValue::isNullPointer() const {}

void APValue::setLValue(LValueBase B, const CharUnits &O, NoLValuePath,
                        bool IsNullPtr) {}

MutableArrayRef<APValue::LValuePathEntry>
APValue::setLValueUninit(LValueBase B, const CharUnits &O, unsigned Size,
                         bool IsOnePastTheEnd, bool IsNullPtr) {}

void APValue::setLValue(LValueBase B, const CharUnits &O,
                        ArrayRef<LValuePathEntry> Path, bool IsOnePastTheEnd,
                        bool IsNullPtr) {}

void APValue::setUnion(const FieldDecl *Field, const APValue &Value) {}

const ValueDecl *APValue::getMemberPointerDecl() const {}

bool APValue::isMemberPointerToDerivedMember() const {}

ArrayRef<const CXXRecordDecl*> APValue::getMemberPointerPath() const {}

void APValue::MakeLValue() {}

void APValue::MakeArray(unsigned InitElts, unsigned Size) {}

MutableArrayRef<APValue::LValuePathEntry>
setLValueUninit(APValue::LValueBase B, const CharUnits &O, unsigned Size,
                bool OnePastTheEnd, bool IsNullPtr);

MutableArrayRef<const CXXRecordDecl *>
APValue::setMemberPointerUninit(const ValueDecl *Member, bool IsDerivedMember,
                                unsigned Size) {}

void APValue::MakeMemberPointer(const ValueDecl *Member, bool IsDerivedMember,
                                ArrayRef<const CXXRecordDecl *> Path) {}

LinkageInfo LinkageComputer::getLVForValue(const APValue &V,
                                           LVComputationKind computation) {}