class CompileUnit

Declaration

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

Description

Stores all information relating to a compile unit, be it in its original instance in the object file to its brand new cloned and generated DIE tree.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:50

Method Overview

Methods

CompileUnit(llvm::DWARFUnit& OrigUnit,
            unsigned int ID,
            bool CanUseODR,
            llvm::StringRef ClangModuleName)

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:79

Parameters

llvm::DWARFUnit& OrigUnit
unsigned int ID
bool CanUseODR
llvm::StringRef ClangModuleName

void addFunctionRange(uint64_t LowPC,
                      uint64_t HighPC,
                      int64_t PCOffset)

Description

Add a function range [\p LowPC, \p HighPC) that is relocated by applying offset \p PCOffset.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:176

Parameters

uint64_t LowPC
uint64_t HighPC
int64_t PCOffset

void addLabelLowPc(uint64_t LabelLowPc,
                   int64_t PcOffset)

Description

Add the low_pc of a label that is relocated by applying offset \p PCOffset.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:172

Parameters

uint64_t LabelLowPc
int64_t PcOffset

void addNameAccelerator(
    const llvm::DIE* Die,
    llvm::DwarfStringPoolEntryRef Name,
    bool SkipPubnamesSection = false)

Description

Add a name accelerator entry for \a Die with \a Name.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:189

Parameters

const llvm::DIE* Die
llvm::DwarfStringPoolEntryRef Name
bool SkipPubnamesSection = false

void addNamespaceAccelerator(
    const llvm::DIE* Die,
    llvm::DwarfStringPoolEntryRef Name)

Description

Add a name accelerator entry for \a Die with \a Name.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:186

Parameters

const llvm::DIE* Die
llvm::DwarfStringPoolEntryRef Name

void addObjCAccelerator(
    const llvm::DIE* Die,
    llvm::DwarfStringPoolEntryRef Name,
    bool SkipPubnamesSection = false)

Description

Add various accelerator entries for \p Die with \p Name which is stored in the string table at \p Offset. \p Name must be an Objective-C selector.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:195

Parameters

const llvm::DIE* Die
llvm::DwarfStringPoolEntryRef Name
bool SkipPubnamesSection = false

void addTypeAccelerator(
    const llvm::DIE* Die,
    llvm::DwarfStringPoolEntryRef Name,
    bool ObjcClassImplementation,
    uint32_t QualifiedNameHash)

Description

Add a type accelerator entry for \p Die with \p Name which is stored in the string table at \p Offset.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:200

Parameters

const llvm::DIE* Die
llvm::DwarfStringPoolEntryRef Name
bool ObjcClassImplementation
uint32_t QualifiedNameHash

uint64_t computeNextUnitOffset()

Description

Compute the end offset for this unit. Must be called after the CU's DIEs have been cloned.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:158

Returns

the next unit offset (which is also the current debug_info section size).

void createOutputDIE()

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:104

void fixupForwardReferences()

Description

Apply all fixups recorded by noteForwardReference().

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:168

const std::string& getClangModuleName() const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:119

const llvm::FunctionIntervals& getFunctionRanges()
    const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:136

uint64_t getHighPc() const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:129

llvm::CompileUnit::DIEInfo& getInfo(
    unsigned int Idx)

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:121

Parameters

unsigned int Idx

const llvm::CompileUnit::DIEInfo& getInfo(
    unsigned int Idx) const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:122

Parameters

unsigned int Idx

llvm::MCSymbol* getLabelBegin()

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:251

uint16_t getLanguage()

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:117

const std::vector<
    std::pair<PatchLocation, int64_t>>&
getLocationAttributes() const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:143

uint64_t getLowPc() const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:128

const std::vector<AccelInfo>& getNamespaces()
    const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:233

uint64_t getNextUnitOffset() const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:125

const std::vector<AccelInfo>& getObjC() const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:234

llvm::DWARFUnit& getOrigUnit() const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:100

llvm::DIE* getOutputUnitDIE() const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:109

const std::vector<AccelInfo>& getPubnames() const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:231

const std::vector<AccelInfo>& getPubtypes() const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:232

const std::vector<PatchLocation>&
getRangesAttributes() const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:138

llvm::StringRef getResolvedPath(
    unsigned int FileNum)

Description

Get the full path for file \a FileNum in the line table

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

Parameters

unsigned int FileNum

uint64_t getStartOffset() const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:124

unsigned int getUniqueID() const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:102

Optional<llvm::PatchLocation>
getUnitRangesAttribute() const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:132

bool hasInterestingContent()

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:148

bool hasLabelAt(uint64_t Addr) const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:130

Parameters

uint64_t Addr

bool hasODR() const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:115

bool isClangModule() const

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:116

void markEverythingAsKept()

Description

Mark every DIE in this unit as kept. This function also marks variables as InDebugMap so that they appear in the reconstructed accelerator tables.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:153

void noteForwardReference(
    llvm::DIE* Die,
    const llvm::CompileUnit* RefUnit,
    llvm::DeclContext* Ctxt,
    llvm::PatchLocation Attr)

Description

Keep track of a forward reference to DIE \p Die in \p RefUnit by \p Attr. The attribute should be fixed up later to point to the absolute offset of \p Die in the debug_info section or to the canonical offset of\p Ctxt if it is non-null.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:164

Parameters

llvm::DIE* Die
const llvm::CompileUnit* RefUnit
llvm::DeclContext* Ctxt
llvm::PatchLocation Attr

void noteLocationAttribute(
    llvm::PatchLocation Attr,
    int64_t PcOffset)

Description

Keep track of a location attribute pointing to a location list in the debug_loc section.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:183

Parameters

llvm::PatchLocation Attr
int64_t PcOffset

void noteRangeAttribute(const llvm::DIE& Die,
                        llvm::PatchLocation Attr)

Description

Keep track of a DW_AT_range attribute that we will need to patch up later.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:179

Parameters

const llvm::DIE& Die
llvm::PatchLocation Attr

void setHasInterestingContent()

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:147

void setLabelBegin(llvm::MCSymbol* S)

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:252

Parameters

llvm::MCSymbol* S

void setResolvedPath(unsigned int FileNum,
                     llvm::StringRef Path)

Description

Set the fully resolved path for the line-table's file \a FileNum to \a Path.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:245

Parameters

unsigned int FileNum
llvm::StringRef Path

void setStartOffset(uint64_t DebugInfoSize)

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:126

Parameters

uint64_t DebugInfoSize