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
- public CompileUnit(llvm::DWARFUnit & OrigUnit, unsigned int ID, bool CanUseODR, llvm::StringRef ClangModuleName)
- public void addFunctionRange(uint64_t LowPC, uint64_t HighPC, int64_t PCOffset)
- public void addLabelLowPc(uint64_t LabelLowPc, int64_t PcOffset)
- public void addNameAccelerator(const llvm::DIE * Die, llvm::DwarfStringPoolEntryRef Name, bool SkipPubnamesSection = false)
- public void addNamespaceAccelerator(const llvm::DIE * Die, llvm::DwarfStringPoolEntryRef Name)
- public void addObjCAccelerator(const llvm::DIE * Die, llvm::DwarfStringPoolEntryRef Name, bool SkipPubnamesSection = false)
- public void addTypeAccelerator(const llvm::DIE * Die, llvm::DwarfStringPoolEntryRef Name, bool ObjcClassImplementation, uint32_t QualifiedNameHash)
- public uint64_t computeNextUnitOffset()
- public void createOutputDIE()
- public void fixupForwardReferences()
- public const std::string & getClangModuleName() const
- public const llvm::FunctionIntervals & getFunctionRanges() const
- public uint64_t getHighPc() const
- public llvm::CompileUnit::DIEInfo & getInfo(unsigned int Idx)
- public const llvm::CompileUnit::DIEInfo & getInfo(unsigned int Idx) const
- public llvm::MCSymbol * getLabelBegin()
- public uint16_t getLanguage()
- public const std::vector<std::pair<PatchLocation, int64_t>> & getLocationAttributes() const
- public uint64_t getLowPc() const
- public const std::vector<AccelInfo> & getNamespaces() const
- public uint64_t getNextUnitOffset() const
- public const std::vector<AccelInfo> & getObjC() const
- public llvm::DWARFUnit & getOrigUnit() const
- public llvm::DIE * getOutputUnitDIE() const
- public const std::vector<AccelInfo> & getPubnames() const
- public const std::vector<AccelInfo> & getPubtypes() const
- public const std::vector<PatchLocation> & getRangesAttributes() const
- public llvm::StringRef getResolvedPath(unsigned int FileNum)
- public uint64_t getStartOffset() const
- public unsigned int getUniqueID() const
- public Optional<llvm::PatchLocation> getUnitRangesAttribute() const
- public bool hasInterestingContent()
- public bool hasLabelAt(uint64_t Addr) const
- public bool hasODR() const
- public bool isClangModule() const
- public void markEverythingAsKept()
- public void noteForwardReference(llvm::DIE * Die, const llvm::CompileUnit * RefUnit, llvm::DeclContext * Ctxt, llvm::PatchLocation Attr)
- public void noteLocationAttribute(llvm::PatchLocation Attr, int64_t PcOffset)
- public void noteRangeAttribute(const llvm::DIE & Die, llvm::PatchLocation Attr)
- public void setHasInterestingContent()
- public void setLabelBegin(llvm::MCSymbol * S)
- public void setResolvedPath(unsigned int FileNum, llvm::StringRef Path)
- public void setStartOffset(uint64_t DebugInfoSize)
Methods
¶CompileUnit(llvm::DWARFUnit& OrigUnit,
unsigned int ID,
bool CanUseODR,
llvm::StringRef ClangModuleName)
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)
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)
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)
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)
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)
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)
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()
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()
void createOutputDIE()
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:104
¶void fixupForwardReferences()
void fixupForwardReferences()
Description
Apply all fixups recorded by noteForwardReference().
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:168
¶const std::string& getClangModuleName() const
const std::string& getClangModuleName() const
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:119
¶const llvm::FunctionIntervals& getFunctionRanges()
const
const llvm::FunctionIntervals& getFunctionRanges()
const
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:136
¶uint64_t getHighPc() const
uint64_t getHighPc() const
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:129
¶llvm::CompileUnit::DIEInfo& getInfo(
unsigned int Idx)
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
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()
llvm::MCSymbol* getLabelBegin()
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:251
¶uint16_t getLanguage()
uint16_t getLanguage()
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:117
¶const std::vector<
std::pair<PatchLocation, int64_t>>&
getLocationAttributes() const
const std::vector<
std::pair<PatchLocation, int64_t>>&
getLocationAttributes() const
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:143
¶uint64_t getLowPc() const
uint64_t getLowPc() const
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:128
¶const std::vector<AccelInfo>& getNamespaces()
const
const std::vector<AccelInfo>& getNamespaces()
const
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:233
¶uint64_t getNextUnitOffset() const
uint64_t getNextUnitOffset() const
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:125
¶const std::vector<AccelInfo>& getObjC() const
const std::vector<AccelInfo>& getObjC() const
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:234
¶llvm::DWARFUnit& getOrigUnit() const
llvm::DWARFUnit& getOrigUnit() const
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:100
¶llvm::DIE* getOutputUnitDIE() const
llvm::DIE* getOutputUnitDIE() const
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:109
¶const std::vector<AccelInfo>& getPubnames() const
const std::vector<AccelInfo>& getPubnames() const
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:231
¶const std::vector<AccelInfo>& getPubtypes() const
const std::vector<AccelInfo>& getPubtypes() const
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:232
¶const std::vector<PatchLocation>&
getRangesAttributes() const
const std::vector<PatchLocation>&
getRangesAttributes() const
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:138
¶llvm::StringRef getResolvedPath(
unsigned int FileNum)
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
uint64_t getStartOffset() const
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:124
¶unsigned int getUniqueID() const
unsigned int getUniqueID() const
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:102
¶Optional<llvm::PatchLocation>
getUnitRangesAttribute() const
Optional<llvm::PatchLocation>
getUnitRangesAttribute() const
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:132
¶bool hasInterestingContent()
bool hasInterestingContent()
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:148
¶bool hasLabelAt(uint64_t Addr) const
bool hasLabelAt(uint64_t Addr) const
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:130
Parameters
- uint64_t Addr
¶bool hasODR() const
bool hasODR() const
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:115
¶bool isClangModule() const
bool isClangModule() const
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:116
¶void markEverythingAsKept()
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)
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)
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)
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()
void setHasInterestingContent()
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:147
¶void setLabelBegin(llvm::MCSymbol* S)
void setLabelBegin(llvm::MCSymbol* S)
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:252
Parameters
¶void setResolvedPath(unsigned int FileNum,
llvm::StringRef Path)
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)
void setStartOffset(uint64_t DebugInfoSize)
Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h:126
Parameters
- uint64_t DebugInfoSize