class DWARFLinker

Declaration

class DWARFLinker { /* full declaration omitted */ };

Description

The core of the Dwarf linking logic. The generation of the dwarf information from the object files will be driven by the selection of 'root DIEs', which are DIEs that describe variables or functions that resolves to the corresponding code section(and thus have entries in the Addresses map). All the debug information that will be generated(the DIEs, but also the line tables, ranges, ...) is derived from that set of root DIEs. The root DIEs are identified because they contain relocations that points to code section(the low_pc for a function, the location for a variable). These relocations are called ValidRelocs in the AddressesInfo and are gathered as a very first step when we start processing a object file.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:237

Member Variables

private FoldingSet<llvm::DIEAbbrev> AbbreviationsSet
FoldingSet that uniques the abbreviations.
private std::vector<std::unique_ptr<DIEAbbrev>> Abbreviations
Storage for the unique Abbreviations. This is passed to AsmPrinter::emitDwarfAbbrevs(), thus it cannot be changed to a vector of unique_ptrs.
private std::vector<DIELoc*> DIELocs
DIELoc objects that need to be destructed (but not freed!).
private std::vector<DIEBlock*> DIEBlocks
DIEBlock objects that need to be destructed (but not freed!).
private llvm::BumpPtrAllocator DIEAlloc
Allocator used for all the DIEValue objects.
private llvm::DwarfEmitter* TheDwarfEmitter
@ }
private std::vector<LinkContext> ObjectContexts
private unsigned int MaxDwarfVersion = 0
private unsigned int MinDwarfVersion = std::numeric_limits<unsigned int>::max()
private bool AtLeastOneAppleAccelTable = false
private bool AtLeastOneDwarfAccelTable = false
private StringMap<uint32_t> EmittedCIEs
The CIEs that have been emitted in the output section. The actual CIE data serves a the key to this StringMap, this takes care of comparing the semantics of CIEs defined in different object files.
private uint32_t LastCIEOffset = 0
Offset of the last CIE that has been emitted in the output .debug_frame section.
private AccelTable<llvm::DWARF5AccelTableStaticData> DebugNames
Apple accelerator tables.
private AccelTable<llvm::AppleAccelTableStaticOffsetData> AppleNames
private AccelTable<llvm::AppleAccelTableStaticOffsetData> AppleNamespaces
private AccelTable<llvm::AppleAccelTableStaticOffsetData> AppleObjc
private AccelTable<llvm::AppleAccelTableStaticTypeData> AppleTypes
private StringMap<uint64_t> ClangModules
Mapping the PCM filename to the DwoId.
private llvm::DwarfLinkerClient DwarfLinkerClientID
private std::function<StringRef(StringRef)> StringsTranslator = nullptr
private struct DWARFLinkerOptions Options

Method Overview

  • public DWARFLinker(llvm::DwarfEmitter * Emitter, llvm::DwarfLinkerClient ClientID = DwarfLinkerClient::General)
  • public void addObjectFile(llvm::DWARFFile & File)
  • private void assignAbbrev(llvm::DIEAbbrev & Abbrev)
  • private void cleanupAuxiliarryData(llvm::DWARFLinker::LinkContext & Context)
  • private void copyInvariantDebugSection(llvm::DWARFContext & Dwarf)
  • private void emitAcceleratorEntriesForUnit(llvm::CompileUnit & Unit)
  • private void emitAppleAcceleratorEntriesForUnit(llvm::CompileUnit & Unit)
  • private void emitDwarfAcceleratorEntriesForUnit(llvm::CompileUnit & Unit)
  • private bool emitPaperTrailWarnings(const llvm::DWARFFile & File, llvm::OffsetsStringPool & StringPool)
  • private void emitPubAcceleratorEntriesForUnit(llvm::CompileUnit & Unit)
  • private void generateUnitRanges(llvm::CompileUnit & Unit) const
  • private void keepDIEAndDependencies(llvm::AddressesMap & RelocMgr, llvm::RangesTy & Ranges, const llvm::UnitListTy & Units, const llvm::DWARFDie & DIE, CompileUnit::DIEInfo & MyInfo, const llvm::DWARFFile & File, llvm::CompileUnit & CU, bool UseODR)
  • public llvm::Error link()
  • private llvm::Error loadClangModule(llvm::DWARFDie CUDie, llvm::StringRef FilePath, llvm::StringRef ModuleName, uint64_t DwoId, const llvm::DWARFFile & File, llvm::OffsetsStringPool & OffsetsStringPool, llvm::DeclContextTree & ODRContexts, uint64_t ModulesEndOffset, unsigned int & UnitID, bool IsLittleEndian, unsigned int Indent = 0, bool Quiet = false)
  • private void lookForChildDIEsToKeep(const llvm::DWARFDie & Die, llvm::CompileUnit & CU, unsigned int Flags, SmallVectorImpl<llvm::DWARFLinker::WorklistItem> & Worklist)
  • private void lookForDIEsToKeep(llvm::AddressesMap & RelocMgr, llvm::RangesTy & Ranges, const llvm::UnitListTy & Units, const llvm::DWARFDie & DIE, const llvm::DWARFFile & File, llvm::CompileUnit & CU, unsigned int Flags)
  • private void lookForParentDIEsToKeep(unsigned int AncestorIdx, llvm::CompileUnit & CU, unsigned int Flags, SmallVectorImpl<llvm::DWARFLinker::WorklistItem> & Worklist)
  • private void lookForRefDIEsToKeep(const llvm::DWARFDie & Die, llvm::CompileUnit & CU, unsigned int Flags, const llvm::UnitListTy & Units, const llvm::DWARFFile & File, SmallVectorImpl<llvm::DWARFLinker::WorklistItem> & Worklist)
  • private void markODRCanonicalDie(const llvm::DWARFDie & Die, llvm::CompileUnit & CU)
  • private bool needToTranslateStrings()
  • private void patchFrameInfoForObject(const llvm::DWARFFile &, llvm::RangesTy & Ranges, llvm::DWARFContext &, unsigned int AddressSize)
  • private void patchLineTableForUnit(llvm::CompileUnit & Unit, llvm::DWARFContext & OrigDwarf, const llvm::DWARFFile & File)
  • private void patchRangesForUnit(const llvm::CompileUnit & Unit, llvm::DWARFContext & Dwarf, const llvm::DWARFFile & File) const
  • private bool registerModuleReference(llvm::DWARFDie CUDie, const llvm::DWARFUnit & Unit, const llvm::DWARFFile & File, llvm::OffsetsStringPool & OffsetsStringPool, llvm::DeclContextTree & ODRContexts, uint64_t ModulesEndOffset, unsigned int & UnitID, bool IsLittleEndian, unsigned int Indent = 0, bool Quiet = false)
  • private void reportError(const llvm::Twine & Warning, const llvm::DWARFFile & File, const llvm::DWARFDie * DIE = nullptr) const
  • private void reportWarning(const llvm::Twine & Warning, const llvm::DWARFFile & File, const llvm::DWARFDie * DIE = nullptr) const
  • private llvm::DWARFDie resolveDIEReference(const llvm::DWARFFile & File, const llvm::UnitListTy & Units, const llvm::DWARFFormValue & RefValue, const llvm::DWARFDie & DIE, llvm::CompileUnit *& RefCU)
  • public void setAccelTableKind(llvm::DwarfLinkerAccelTableKind Kind)
  • public void setErrorHandler(llvm::messageHandler Handler)
  • public void setEstimatedObjfilesAmount(unsigned int ObjFilesNum)
  • public void setKeepFunctionForStatic(bool KeepFunctionForStatic)
  • public void setNoODR(bool NoODR)
  • public void setNoOutput(bool NoOut)
  • public void setNumThreads(unsigned int NumThreads)
  • public void setObjFileLoader(llvm::objFileLoader Loader)
  • public void setObjectPrefixMap(llvm::objectPrefixMap * Map)
  • public void setPrependPath(const std::string & Ppath)
  • public void setStatistics(bool Statistics)
  • public void setStringsTranslator(std::function<StringRef (StringRef)> StringsTranslator)
  • public void setSwiftInterfacesMap(llvm::swiftInterfacesMap * Map)
  • public void setUpdate(bool Update)
  • public void setVerbosity(bool Verbose)
  • public void setVerifyInputDWARF(bool Verify)
  • public void setWarningHandler(llvm::messageHandler Handler)
  • private unsigned int shouldKeepDIE(llvm::AddressesMap & RelocMgr, llvm::RangesTy & Ranges, const llvm::DWARFDie & DIE, const llvm::DWARFFile & File, llvm::CompileUnit & Unit, CompileUnit::DIEInfo & MyInfo, unsigned int Flags)
  • private unsigned int shouldKeepSubprogramDIE(llvm::AddressesMap & RelocMgr, llvm::RangesTy & Ranges, const llvm::DWARFDie & DIE, const llvm::DWARFFile & File, llvm::CompileUnit & Unit, CompileUnit::DIEInfo & MyInfo, unsigned int Flags)
  • private unsigned int shouldKeepVariableDIE(llvm::AddressesMap & RelocMgr, const llvm::DWARFDie & DIE, CompileUnit::DIEInfo & MyInfo, unsigned int Flags)
  • private void updateAccelKind(llvm::DWARFContext & Dwarf)
  • private void updateDwarfVersion(unsigned int Version)
  • private bool verify(const llvm::DWARFFile & File)

Methods

DWARFLinker(llvm::DwarfEmitter* Emitter,
            llvm::DwarfLinkerClient ClientID =
                DwarfLinkerClient::General)

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:239

Parameters

llvm::DwarfEmitter* Emitter
llvm::DwarfLinkerClient ClientID = DwarfLinkerClient::General

void addObjectFile(llvm::DWARFFile& File)

Description

Add object file to be linked.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:244

Parameters

llvm::DWARFFile& File

void assignAbbrev(llvm::DIEAbbrev& Abbrev)

Description

Assign an abbreviation number to \p Abbrev

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:688

Parameters

llvm::DIEAbbrev& Abbrev

void cleanupAuxiliarryData(
    llvm::DWARFLinker::LinkContext& Context)

Description

Called before emitting object data

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:430

Parameters

llvm::DWARFLinker::LinkContext& Context

void copyInvariantDebugSection(
    llvm::DWARFContext& Dwarf)

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:411

Parameters

llvm::DWARFContext& Dwarf

void emitAcceleratorEntriesForUnit(
    llvm::CompileUnit& Unit)

Description

Emit the accelerator entries for \p Unit.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:706

Parameters

llvm::CompileUnit& Unit

void emitAppleAcceleratorEntriesForUnit(
    llvm::CompileUnit& Unit)

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:708

Parameters

llvm::CompileUnit& Unit

void emitDwarfAcceleratorEntriesForUnit(
    llvm::CompileUnit& Unit)

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:707

Parameters

llvm::CompileUnit& Unit

bool emitPaperTrailWarnings(
    const llvm::DWARFFile& File,
    llvm::OffsetsStringPool& StringPool)

Description

Emit warnings as Dwarf compile units to leave a trail after linking.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:408

Parameters

const llvm::DWARFFile& File
llvm::OffsetsStringPool& StringPool

void emitPubAcceleratorEntriesForUnit(
    llvm::CompileUnit& Unit)

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:709

Parameters

llvm::CompileUnit& Unit

void generateUnitRanges(
    llvm::CompileUnit& Unit) const

Description

Generate and emit the DW_AT_ranges attribute for a compile_unit if it had one.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:697

Parameters

llvm::CompileUnit& Unit

void keepDIEAndDependencies(
    llvm::AddressesMap& RelocMgr,
    llvm::RangesTy& Ranges,
    const llvm::UnitListTy& Units,
    const llvm::DWARFDie& DIE,
    CompileUnit::DIEInfo& MyInfo,
    const llvm::DWARFFile& File,
    llvm::CompileUnit& CU,
    bool UseODR)

Description

Mark the passed DIE as well as all the ones it depends on as kept.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:493

Parameters

llvm::AddressesMap& RelocMgr
llvm::RangesTy& Ranges
const llvm::UnitListTy& Units
const llvm::DWARFDie& DIE
CompileUnit::DIEInfo& MyInfo
const llvm::DWARFFile& File
llvm::CompileUnit& CU
bool UseODR

llvm::Error link()

Description

Link debug info for added objFiles. Object files are linked all together.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:248

llvm::Error loadClangModule(
    llvm::DWARFDie CUDie,
    llvm::StringRef FilePath,
    llvm::StringRef ModuleName,
    uint64_t DwoId,
    const llvm::DWARFFile& File,
    llvm::OffsetsStringPool& OffsetsStringPool,
    llvm::DeclContextTree& ODRContexts,
    uint64_t ModulesEndOffset,
    unsigned int& UnitID,
    bool IsLittleEndian,
    unsigned int Indent = 0,
    bool Quiet = false)

Description

Recursively add the debug info in this clang module .pcm file (and all the modules imported by it in a bottom-up fashion) to Units.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:484

Parameters

llvm::DWARFDie CUDie
llvm::StringRef FilePath
llvm::StringRef ModuleName
uint64_t DwoId
const llvm::DWARFFile& File
llvm::OffsetsStringPool& OffsetsStringPool
llvm::DeclContextTree& ODRContexts
uint64_t ModulesEndOffset
unsigned int& UnitID
bool IsLittleEndian
unsigned int Indent = 0
bool Quiet = false

void lookForChildDIEsToKeep(
    const llvm::DWARFDie& Die,
    llvm::CompileUnit& CU,
    unsigned int Flags,
    SmallVectorImpl<
        llvm::DWARFLinker::WorklistItem>&
        Worklist)

Description

Look at the children of the given DIE and decide whether they should be kept.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:440

Parameters

const llvm::DWARFDie& Die
llvm::CompileUnit& CU
unsigned int Flags
SmallVectorImpl<llvm::DWARFLinker::WorklistItem>& Worklist

void lookForDIEsToKeep(
    llvm::AddressesMap& RelocMgr,
    llvm::RangesTy& Ranges,
    const llvm::UnitListTy& Units,
    const llvm::DWARFDie& DIE,
    const llvm::DWARFFile& File,
    llvm::CompileUnit& CU,
    unsigned int Flags)

Description

@ { Recursively walk the \p DIE tree and look for DIEs to keep. Store that information in \p CU's DIEInfo. The return value indicates whether the DIE is incomplete.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:462

Parameters

llvm::AddressesMap& RelocMgr
llvm::RangesTy& Ranges
const llvm::UnitListTy& Units
const llvm::DWARFDie& DIE
const llvm::DWARFFile& File
llvm::CompileUnit& CU
unsigned int Flags

void lookForParentDIEsToKeep(
    unsigned int AncestorIdx,
    llvm::CompileUnit& CU,
    unsigned int Flags,
    SmallVectorImpl<
        llvm::DWARFLinker::WorklistItem>&
        Worklist)

Description

Look at the parent of the given DIE and decide whether they should be kept.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:434

Parameters

unsigned int AncestorIdx
llvm::CompileUnit& CU
unsigned int Flags
SmallVectorImpl<llvm::DWARFLinker::WorklistItem>& Worklist

void lookForRefDIEsToKeep(
    const llvm::DWARFDie& Die,
    llvm::CompileUnit& CU,
    unsigned int Flags,
    const llvm::UnitListTy& Units,
    const llvm::DWARFFile& File,
    SmallVectorImpl<
        llvm::DWARFLinker::WorklistItem>&
        Worklist)

Description

Look at DIEs referenced by the given DIE and decide whether they should be kept. All DIEs referenced though attributes should be kept.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:446

Parameters

const llvm::DWARFDie& Die
llvm::CompileUnit& CU
unsigned int Flags
const llvm::UnitListTy& Units
const llvm::DWARFFile& File
SmallVectorImpl<llvm::DWARFLinker::WorklistItem>& Worklist

void markODRCanonicalDie(
    const llvm::DWARFDie& Die,
    llvm::CompileUnit& CU)

Description

Mark context corresponding to the specified \p Die as having canonical die, if applicable.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:453

Parameters

const llvm::DWARFDie& Die
llvm::CompileUnit& CU

bool needToTranslateStrings()

Description

returns true if we need to translate strings.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:384

void patchFrameInfoForObject(
    const llvm::DWARFFile&,
    llvm::RangesTy& Ranges,
    llvm::DWARFContext&,
    unsigned int AddressSize)

Description

Patch the frame info for an object file and emit it.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:712

Parameters

const llvm::DWARFFile&
llvm::RangesTy& Ranges
llvm::DWARFContext&
unsigned int AddressSize

void patchLineTableForUnit(
    llvm::CompileUnit& Unit,
    llvm::DWARFContext& OrigDwarf,
    const llvm::DWARFFile& File)

Description

Extract the line tables from the original dwarf, extract the relevant parts according to the linked function ranges and emit the result in the .debug_line section.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:702

Parameters

llvm::CompileUnit& Unit
llvm::DWARFContext& OrigDwarf
const llvm::DWARFFile& File

void patchRangesForUnit(
    const llvm::CompileUnit& Unit,
    llvm::DWARFContext& Dwarf,
    const llvm::DWARFFile& File) const

Description

Compute and emit .debug_ranges section for \p Unit, and patch the attributes referencing it.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:692

Parameters

const llvm::CompileUnit& Unit
llvm::DWARFContext& Dwarf
const llvm::DWARFFile& File

bool registerModuleReference(
    llvm::DWARFDie CUDie,
    const llvm::DWARFUnit& Unit,
    const llvm::DWARFFile& File,
    llvm::OffsetsStringPool& OffsetsStringPool,
    llvm::DeclContextTree& ODRContexts,
    uint64_t ModulesEndOffset,
    unsigned int& UnitID,
    bool IsLittleEndian,
    unsigned int Indent = 0,
    bool Quiet = false)

Description

If this compile unit is really a skeleton CU that points to a clang module, register it in ClangModules and return true. A skeleton CU is a CU without children, a DW_AT_gnu_dwo_name pointing to the module, and a DW_AT_gnu_dwo_id with the module hash.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:473

Parameters

llvm::DWARFDie CUDie
const llvm::DWARFUnit& Unit
const llvm::DWARFFile& File
llvm::OffsetsStringPool& OffsetsStringPool
llvm::DeclContextTree& ODRContexts
uint64_t ModulesEndOffset
unsigned int& UnitID
bool IsLittleEndian
unsigned int Indent = 0
bool Quiet = false

void reportError(
    const llvm::Twine& Warning,
    const llvm::DWARFFile& File,
    const llvm::DWARFDie* DIE = nullptr) const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:392

Parameters

const llvm::Twine& Warning
const llvm::DWARFFile& File
const llvm::DWARFDie* DIE = nullptr

void reportWarning(
    const llvm::Twine& Warning,
    const llvm::DWARFFile& File,
    const llvm::DWARFDie* DIE = nullptr) const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:386

Parameters

const llvm::Twine& Warning
const llvm::DWARFFile& File
const llvm::DWARFDie* DIE = nullptr

llvm::DWARFDie resolveDIEReference(
    const llvm::DWARFFile& File,
    const llvm::UnitListTy& Units,
    const llvm::DWARFFormValue& RefValue,
    const llvm::DWARFDie& DIE,
    llvm::CompileUnit*& RefCU)

Description

Resolve the DIE attribute reference that has been extracted in \p RefValue. The resulting DIE might be in another CompileUnit which is stored into \p ReferencedCU.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:519

Parameters

const llvm::DWARFFile& File
const llvm::UnitListTy& Units
const llvm::DWARFFormValue& RefValue
const llvm::DWARFDie& DIE
llvm::CompileUnit*& RefCU

Returns

null if resolving fails for any reason.

void setAccelTableKind(
    llvm::DwarfLinkerAccelTableKind Kind)

Description

Set kind of accelerator tables to be generated.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:279

Parameters

llvm::DwarfLinkerAccelTableKind Kind

void setErrorHandler(llvm::messageHandler Handler)

Description

Set error handler which would be used to report errors.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:303

Parameters

llvm::messageHandler Handler

void setEstimatedObjfilesAmount(
    unsigned int ObjFilesNum)

Description

Set estimated objects files amount, for preliminary data allocation.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:293

Parameters

unsigned int ObjFilesNum

void setKeepFunctionForStatic(
    bool KeepFunctionForStatic)

Description

Set whether to keep the enclosing function for a static variable.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:271

Parameters

bool KeepFunctionForStatic

void setNoODR(bool NoODR)

Description

Do not unique types according to ODR.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:265

Parameters

bool NoODR

void setNoOutput(bool NoOut)

Description

Do not emit linked dwarf info.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:262

Parameters

bool NoOut

void setNumThreads(unsigned int NumThreads)

Description

Use specified number of threads for parallel files linking.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:276

Parameters

unsigned int NumThreads

void setObjFileLoader(llvm::objFileLoader Loader)

Description

Set object files loader which would be used to load additional objects for splitted dwarf.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:309

Parameters

llvm::objFileLoader Loader

void setObjectPrefixMap(
    llvm::objectPrefixMap* Map)

Description

Set prefix map for objects.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:319

Parameters

llvm::objectPrefixMap* Map

void setPrependPath(const std::string& Ppath)

Description

Set prepend path for clang modules.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:284

Parameters

const std::string& Ppath

void setStatistics(bool Statistics)

Description

Print statistics to standard output.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:256

Parameters

bool Statistics

void setStringsTranslator(
    std::function<StringRef(StringRef)>
        StringsTranslator)

Description

Set translator which would be used for strings.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:288

Parameters

std::function<StringRef(StringRef)> StringsTranslator

void setSwiftInterfacesMap(
    llvm::swiftInterfacesMap* Map)

Description

Set map for Swift interfaces.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:314

Parameters

llvm::swiftInterfacesMap* Map

void setUpdate(bool Update)

Description

update existing DWARF info(for the linked binary).

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:268

Parameters

bool Update

void setVerbosity(bool Verbose)

Description

Allows to generate log of linking process to the standard output.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:253

Parameters

bool Verbose

void setVerifyInputDWARF(bool Verify)

Description

Verify the input DWARF.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:259

Parameters

bool Verify

void setWarningHandler(
    llvm::messageHandler Handler)

Description

Set warning handler which would be used to report warnings.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:298

Parameters

llvm::messageHandler Handler

unsigned int shouldKeepDIE(
    llvm::AddressesMap& RelocMgr,
    llvm::RangesTy& Ranges,
    const llvm::DWARFDie& DIE,
    const llvm::DWARFFile& File,
    llvm::CompileUnit& Unit,
    CompileUnit::DIEInfo& MyInfo,
    unsigned int Flags)

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:499

Parameters

llvm::AddressesMap& RelocMgr
llvm::RangesTy& Ranges
const llvm::DWARFDie& DIE
const llvm::DWARFFile& File
llvm::CompileUnit& Unit
CompileUnit::DIEInfo& MyInfo
unsigned int Flags

unsigned int shouldKeepSubprogramDIE(
    llvm::AddressesMap& RelocMgr,
    llvm::RangesTy& Ranges,
    const llvm::DWARFDie& DIE,
    const llvm::DWARFFile& File,
    llvm::CompileUnit& Unit,
    CompileUnit::DIEInfo& MyInfo,
    unsigned int Flags)

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:509

Parameters

llvm::AddressesMap& RelocMgr
llvm::RangesTy& Ranges
const llvm::DWARFDie& DIE
const llvm::DWARFFile& File
llvm::CompileUnit& Unit
CompileUnit::DIEInfo& MyInfo
unsigned int Flags

unsigned int shouldKeepVariableDIE(
    llvm::AddressesMap& RelocMgr,
    const llvm::DWARFDie& DIE,
    CompileUnit::DIEInfo& MyInfo,
    unsigned int Flags)

Description

Check if a variable describing DIE should be kept.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:506

Parameters

llvm::AddressesMap& RelocMgr
const llvm::DWARFDie& DIE
CompileUnit::DIEInfo& MyInfo
unsigned int Flags

Returns

updated TraversalFlags.

void updateAccelKind(llvm::DWARFContext& Dwarf)

Description

Remembers the kinds of accelerator tables we've seen in a unit.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:405

Parameters

llvm::DWARFContext& Dwarf

void updateDwarfVersion(unsigned int Version)

Description

Remembers the oldest and newest DWARF version we've seen in a unit.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:399

Parameters

unsigned int Version

bool verify(const llvm::DWARFFile& File)

Description

Verify the given DWARF file.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinker.h:381

Parameters

const llvm::DWARFFile& File