9#ifndef LLVM_LIB_DWARFLINKER_PARALLEL_DWARFLINKERUNIT_H
10#define LLVM_LIB_DWARFLINKER_PARALLEL_DWARFLINKERUNIT_H
22namespace dwarf_linker {
170 std::optional<uint64_t>
172 std::optional<uint64_t> LengthOffset);
214 case dwarf::DW_LANG_C_plus_plus:
215 case dwarf::DW_LANG_C_plus_plus_03:
216 case dwarf::DW_LANG_C_plus_plus_11:
217 case dwarf::DW_LANG_C_plus_plus_14:
218 case dwarf::DW_LANG_ObjC_plus_plus:
Analysis containing CSE Info
Dwarf abbreviation, describes the organization of a debug information object.
A structured debug information entry.
dwarf::Tag getTag() const
Lightweight error class with error context and mandatory checking.
FoldingSet - This template class is used to instantiate a specialized implementation of the folding s...
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
StringRef - Represent a constant reference to a string, i.e.
Triple - Helper class for working with autoconf configuration names.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
The instances of the Type class are immutable: once they are created, they are never changed.
This class stores values sequentually and assigns index to the each value.
Base class for all Dwarf units(Compile unit/Type table unit).
unsigned getUniqueID() const
Unique id of the unit.
std::string UnitName
The name of this unit.
LinkingGlobalData & getGlobalData()
Return global data.
std::vector< std::unique_ptr< DIEAbbrev > > Abbreviations
Storage for the unique Abbreviations.
dwarf::Tag getTag() const
Returns unit DWARF tag.
DIE * OutUnitDIE
Output unit DIE.
std::string SysRoot
The DW_AT_LLVM_sysroot of this unit.
bool isClangModule() const
Return true if this compile unit is from Clang module.
uint64_t getUnitSize() const
Returns size of this(newly generated) compile unit.
void assignAbbrev(DIEAbbrev &Abbrev)
Adds Abbrev into unit`s abbreviation table.
void setInterconnectedCU()
Mark this unit as inter-connected(it references/referenced by other unit).
IndexedValuesMap< const StringEntry * > DebugStringIndexMap
Maps a string into the index inside .debug_str_offsets section.
std::optional< uint64_t > emitPubAcceleratorEntry(SectionDescriptor &OutSection, const AccelInfo &Info, std::optional< uint64_t > LengthOffset)
Emit single pubnames/pubtypes accelerator entry.
unsigned ID
Unique ID for the unit.
StringRef getUnitName() const
Returns this unit name.
const std::string & getClangModuleName() const
Return Clang module name;.
std::atomic< bool > IsInterconnectedCU
true if current unit references_to/is_referenced by other unit.
void setOutUnitDIE(DIE *UnitDie)
Set output unit DIE.
DwarfUnit(LinkingGlobalData &GlobalData, unsigned ID, StringRef ClangModuleName)
std::string ClangModuleName
If this is a Clang module, this holds the module's name.
dwarf::Tag UnitTag
DWARF unit tag.
bool isInterconnectedCU() const
Returns true if unit is inter-connected(it references/referenced by other unit).
virtual uint64_t getDebugStrIndex(const StringEntry *String)
Returns index(inside .debug_str_offsets) of specified string.
const std::vector< std::unique_ptr< DIEAbbrev > > & getAbbreviations() const
Returns abbreviations for this compile unit.
void emitDwarfAbbrevEntry(const DIEAbbrev &Abbrev, SectionDescriptor &AbbrevSection)
Emit single abbreviation entry.
FoldingSet< DIEAbbrev > AbbreviationsSet
FoldingSet that uniques the abbreviations.
StringRef getSysRoot()
Return the DW_AT_LLVM_sysroot of the compile unit or an empty StringRef.
DIE * getOutUnitDIE()
Returns output unit DIE.
This class keeps data and services common for the whole linking process.
void warn(const Twine &Warning, StringRef Context, const DWARFDie *DIE=nullptr)
Report warning.
This class keeps contents and offsets to the debug sections.
LinkingGlobalData & GlobalData
uint16_t getDebugInfoHeaderSize() const
Return size of header of debug_info table.
An efficient, type-erasing, non-owning reference to a callable.
Error emitDebugInfo(const Triple &TargetTriple)
Emit .debug_info section for unit DIEs.
Error emitDebugStringOffsetSection()
Emit the .debug_str_offsets section for current unit.
virtual void forEachAcceleratorRecord(function_ref< void(AccelInfo &)> Handler)=0
Enumerates accelerator data.
void emitPubAccelerators()
Emit .debug_pubnames and .debug_pubtypes for Unit.
void error(const Twine &Err)
void warn(const Twine &Warning)
Error emitAbbreviations()
Error emitDebugLine(const Triple &TargetTriple, const DWARFDebugLine::LineTable &OutLineTable)
Emit .debug_line section.
bool isODRLanguage(uint16_t Language)
This is an optimization pass for GlobalISel generic memory operations.
This structure keeps fields which would be used for creating accelerator table.
bool AvoidForPubSections
Avoid emitting this entry for pub sections.
StringEntry * String
Name of the entry.
uint64_t OutOffset
Output offset of the DIE this entry describes.
uint32_t QualifiedNameHash
Hash of the fully qualified name.
bool ObjcClassImplementation
Is this an ObjC class implementation?
This structure is used to keep data of the concrete section.