LLVM: llvm::dwarf_linker::parallel::TypeUnit Class Reference (original) (raw)
Type Unit is used to represent an artificial compilation unit which keeps all type information. More...
Public Member Functions
TypeUnit (LinkingGlobalData &GlobalData, unsigned ID, std::optional< uint16_t > Language, dwarf::FormParams Format, llvm::endianness Endianess)
void
createDIETree (BumpPtrAllocator &Allocator)
Generates DIE tree based on information from TypesMap.
finishCloningAndEmit (const Triple &TargetTriple)
Emits resulting dwarf based on information from DIE tree.
TypePool &
getTypePool ()
Returns global type pool.
void
forEachAcceleratorRecord (function_ref< void(AccelInfo &)> Handler) override
Enumerates all accelerator records and call Handler for each.
getDebugStrIndex (const StringEntry *String) override
Returns index for the specified String inside .debug_str_offsets.
void
saveAcceleratorInfo (const TypeUnitAccelInfo &Info)
Adds Info to the unit's accelerator records.
Public Member Functions inherited from llvm::dwarf_linker::parallel::DwarfUnit
virtual
~DwarfUnit ()=default
DwarfUnit (LinkingGlobalData &GlobalData, unsigned ID, StringRef ClangModuleName)
getUniqueID () const
Unique id of the unit.
getUnitSize () const
Returns size of this(newly generated) compile unit.
getUnitName () const
Returns this unit name.
getSysRoot ()
Return the DW_AT_LLVM_sysroot of the compile unit or an empty StringRef.
Return true if this compile unit is from Clang module.
const std::string &
Return Clang module name;.
Return global data.
Returns true if unit is inter-connected(it references/referenced by other unit).
void
Mark this unit as inter-connected(it references/referenced by other unit).
void
assignAbbrev (DIEAbbrev &Abbrev)
Adds Abbrev into unit`s abbreviation table.
const std::vector< std::unique_ptr< DIEAbbrev > > &
Returns abbreviations for this compile unit.
DIE *
Returns output unit DIE.
void
setOutUnitDIE (DIE *UnitDie)
Set output unit DIE.
Returns unit DWARF tag.
emitDebugInfo (const Triple &TargetTriple)
Emit .debug_info section for unit DIEs.
emitDebugLine (const Triple &TargetTriple, const DWARFDebugLine::LineTable &OutLineTable)
Emit .debug_line section.
emitDebugStringOffsetSection ()
Emit the .debug_str_offsets section for current unit.
void
void
void
Emit .debug_pubnames and .debug_pubtypes for Unit.
Public Member Functions inherited from llvm::dwarf_linker::parallel::OutputSections
OutputSections (LinkingGlobalData &GlobalData)
void
setOutputFormat (dwarf::FormParams Format, llvm::endianness Endianness)
Sets output format for all keeping sections.
getSectionDescriptor (DebugSectionKind SectionKind) const
Returns descriptor for the specified section of [SectionKind](classllvm%5F1%5F1SectionKind.html "SectionKind - This is a simple POD value that classifies the properties of a section.").
getSectionDescriptor (DebugSectionKind SectionKind)
Returns descriptor for the specified section of [SectionKind](classllvm%5F1%5F1SectionKind.html "SectionKind - This is a simple POD value that classifies the properties of a section.").
std::optional< const SectionDescriptor * >
tryGetSectionDescriptor (DebugSectionKind SectionKind) const
Returns descriptor for the specified section of [SectionKind](classllvm%5F1%5F1SectionKind.html "SectionKind - This is a simple POD value that classifies the properties of a section.").
std::optional< SectionDescriptor * >
tryGetSectionDescriptor (DebugSectionKind SectionKind)
Returns descriptor for the specified section of [SectionKind](classllvm%5F1%5F1SectionKind.html "SectionKind - This is a simple POD value that classifies the properties of a section.").
getOrCreateSectionDescriptor (DebugSectionKind SectionKind)
Returns descriptor for the specified section of [SectionKind](classllvm%5F1%5F1SectionKind.html "SectionKind - This is a simple POD value that classifies the properties of a section.").
void
Erases data of all sections.
void
forEach (function_ref< void(SectionDescriptor &)> Handler)
Enumerate all sections and call Handler for each.
void
forEach (function_ref< void(std::shared_ptr< SectionDescriptor > Section)> Handler)
Enumerate all sections and call Handler for each.
void
assignSectionsOffsetAndAccumulateSize (std::array< uint64_t, SectionKindsNum > &SectionSizesAccumulator)
Enumerate all sections, for each section set current offset (kept by SectionSizesAccumulator), update current offset with section length.
void
applyPatches (SectionDescriptor &Section, StringEntryToDwarfStringPoolEntryMap &DebugStrStrings, StringEntryToDwarfStringPoolEntryMap &DebugLineStrStrings, TypeUnit *TypeUnitPtr)
Enumerate all sections, for each section apply all section patches.
Endiannes for the sections.
getVersion () const
Return DWARF version.
getDebugInfoHeaderSize () const
Return size of header of debug_info table.
getDebugAddrHeaderSize () const
Return size of header of debug_ table.
getDebugStrOffsetsHeaderSize () const
Return size of header of debug_str_offsets table.
Return size of address.
Type Unit is used to represent an artificial compilation unit which keeps all type information.
This type information is referenced from other compilation units.
Definition at line 24 of file DWARFLinkerTypeUnit.h.