llvm/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp

//===- DWARFDie.cpp -------------------------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//

#include "llvm/DebugInfo/DWARF/DWARFDie.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h"
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
#include "llvm/DebugInfo/DWARF/DWARFDebugLine.h"
#include "llvm/DebugInfo/DWARF/DWARFDebugLoc.h"
#include "llvm/DebugInfo/DWARF/DWARFExpression.h"
#include "llvm/DebugInfo/DWARF/DWARFFormValue.h"
#include "llvm/DebugInfo/DWARF/DWARFTypePrinter.h"
#include "llvm/DebugInfo/DWARF/DWARFTypeUnit.h"
#include "llvm/DebugInfo/DWARF/DWARFUnit.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/DataExtractor.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cinttypes>
#include <cstdint>
#include <string>
#include <utility>

usingnamespacellvm;
usingnamespacedwarf;
usingnamespaceobject;

static void dumpApplePropertyAttribute(raw_ostream &OS, uint64_t Val) {}

static void dumpRanges(const DWARFObject &Obj, raw_ostream &OS,
                       const DWARFAddressRangesVector &Ranges,
                       unsigned AddressSize, unsigned Indent,
                       const DIDumpOptions &DumpOpts) {}

static void dumpLocationList(raw_ostream &OS, const DWARFFormValue &FormValue,
                             DWARFUnit *U, unsigned Indent,
                             DIDumpOptions DumpOpts) {}

static void dumpLocationExpr(raw_ostream &OS, const DWARFFormValue &FormValue,
                             DWARFUnit *U, unsigned Indent,
                             DIDumpOptions DumpOpts) {}

static DWARFDie resolveReferencedType(DWARFDie D, DWARFFormValue F) {}

static void dumpAttribute(raw_ostream &OS, const DWARFDie &Die,
                          const DWARFAttribute &AttrValue, unsigned Indent,
                          DIDumpOptions DumpOpts) {}

void DWARFDie::getFullName(raw_string_ostream &OS,
                           std::string *OriginalFullName) const {}

bool DWARFDie::isSubprogramDIE() const {}

bool DWARFDie::isSubroutineDIE() const {}

std::optional<DWARFFormValue> DWARFDie::find(dwarf::Attribute Attr) const {}

std::optional<DWARFFormValue>
DWARFDie::find(ArrayRef<dwarf::Attribute> Attrs) const {}

std::optional<DWARFFormValue>
DWARFDie::findRecursively(ArrayRef<dwarf::Attribute> Attrs) const {}

DWARFDie
DWARFDie::getAttributeValueAsReferencedDie(dwarf::Attribute Attr) const {}

DWARFDie
DWARFDie::getAttributeValueAsReferencedDie(const DWARFFormValue &V) const {}

DWARFDie DWARFDie::resolveTypeUnitReference() const {}

std::optional<uint64_t> DWARFDie::getRangesBaseAttribute() const {}

std::optional<uint64_t> DWARFDie::getLocBaseAttribute() const {}

std::optional<uint64_t> DWARFDie::getHighPC(uint64_t LowPC) const {}

bool DWARFDie::getLowAndHighPC(uint64_t &LowPC, uint64_t &HighPC,
                               uint64_t &SectionIndex) const {}

Expected<DWARFAddressRangesVector> DWARFDie::getAddressRanges() const {}

bool DWARFDie::addressRangeContainsAddress(const uint64_t Address) const {}

Expected<DWARFLocationExpressionsVector>
DWARFDie::getLocations(dwarf::Attribute Attr) const {}

const char *DWARFDie::getSubroutineName(DINameKind Kind) const {}

const char *DWARFDie::getName(DINameKind Kind) const {}

const char *DWARFDie::getShortName() const {}

const char *DWARFDie::getLinkageName() const {}

uint64_t DWARFDie::getDeclLine() const {}

std::string
DWARFDie::getDeclFile(DILineInfoSpecifier::FileLineInfoKind Kind) const {}

void DWARFDie::getCallerFrame(uint32_t &CallFile, uint32_t &CallLine,
                              uint32_t &CallColumn,
                              uint32_t &CallDiscriminator) const {}

static std::optional<uint64_t>
getTypeSizeImpl(DWARFDie Die, uint64_t PointerSize,
                SmallPtrSetImpl<const DWARFDebugInfoEntry *> &Visited) {}

std::optional<uint64_t> DWARFDie::getTypeSize(uint64_t PointerSize) {}

/// Helper to dump a DIE with all of its parents, but no siblings.
static unsigned dumpParentChain(DWARFDie Die, raw_ostream &OS, unsigned Indent,
                                DIDumpOptions DumpOpts, unsigned Depth = 0) {}

void DWARFDie::dump(raw_ostream &OS, unsigned Indent,
                    DIDumpOptions DumpOpts) const {}

LLVM_DUMP_METHOD void DWARFDie::dump() const {}

DWARFDie DWARFDie::getParent() const {}

DWARFDie DWARFDie::getSibling() const {}

DWARFDie DWARFDie::getPreviousSibling() const {}

DWARFDie DWARFDie::getFirstChild() const {}

DWARFDie DWARFDie::getLastChild() const {}

iterator_range<DWARFDie::attribute_iterator> DWARFDie::attributes() const {}

DWARFDie::attribute_iterator::attribute_iterator(DWARFDie D, bool End)
    :{}

void DWARFDie::attribute_iterator::updateForIndex(
    const DWARFAbbreviationDeclaration &AbbrDecl, uint32_t I) {}

DWARFDie::attribute_iterator &DWARFDie::attribute_iterator::operator++() {}

bool DWARFAttribute::mayHaveLocationList(dwarf::Attribute Attr) {}

bool DWARFAttribute::mayHaveLocationExpr(dwarf::Attribute Attr) {}

namespace llvm {

void dumpTypeQualifiedName(const DWARFDie &DIE, raw_ostream &OS) {}

void dumpTypeUnqualifiedName(const DWARFDie &DIE, raw_ostream &OS,
                             std::string *OriginalFullName) {}

} // namespace llvm