LLVM 18.0.0git
Classes | Typedefs | Enumerations | Functions | Variables
llvm::dwarflinker_parallel Namespace Reference

Classes

class  AddressesMap
 AddressesMap represents information about valid addresses used by debug information. More...
 
class  ArrayList
 This class is a simple list of T structures. More...
 
struct  BrokenLink
 A broken link in the keep chain. More...
 
class  CompileUnit
 Stores all information related to a compile unit, be it in its original instance of the object file or its brand new cloned and generated DIE tree. More...
 
struct  DebugDieRefPatch
 This structure is used to update reference to the DIE. More...
 
class  DebugLineSectionEmitter
 This class emits specified line table into the .debug_line section. More...
 
struct  DebugLineStrPatch
 This structure is used to update strings offsets into .debug_line_str. More...
 
struct  DebugLocPatch
 This structure is used to update location list offset into .debug_loc/.debug_loclists. More...
 
struct  DebugOffsetPatch
 
struct  DebugRangePatch
 This structure is used to update range list offset into .debug_ranges/.debug_rnglists. More...
 
struct  DebugStrPatch
 This structure is used to update strings offsets into .debug_str. More...
 
struct  DebugULEB128DieRefPatch
 This structure is used to update reference to the DIE of ULEB128 form. More...
 
class  DependencyTracker
 This class discovers DIEs dependencies and marks "live" DIEs. More...
 
class  DIEAttributeCloner
 This class creates clones of input DIE attributes. More...
 
class  DIEGenerator
 This class is a helper to create output DIE tree. More...
 
class  DwarfEmitterImpl
 This class emits DWARF data to the output stream. More...
 
class  DWARFFile
 This class represents DWARF information for source file and it's address map. More...
 
class  DWARFLinker
 
class  DWARFLinkerImpl
 This class links debug info. More...
 
struct  DWARFLinkerOptions
 linking options More...
 
class  DwarfUnit
 Base class for all Dwarf units(Compile unit/Type table unit). More...
 
class  ExtraDwarfEmitter
 ExtraDwarfEmitter allows adding extra data to the DWARFLinker output. More...
 
class  IndexedValuesMap
 
class  LinkingGlobalData
 This class keeps data and services common for the whole linking process. More...
 
class  OutputSections
 This class keeps contents and offsets to the debug sections. More...
 
struct  SectionDescriptor
 This structure is used to keep data of the concrete section. More...
 
struct  SectionPatch
 There are fields(sizes, offsets) which should be updated after sections are generated. More...
 
class  StringEntryToDwarfStringPoolEntryMap
 This class creates a DwarfStringPoolEntry for the corresponding StringEntry. More...
 
class  StringPool
 
class  StringPoolEntryInfo
 

Typedefs

using RangesTy = AddressRangesMap
 Mapped value in the address map is the offset to apply to the linked address.
 
using StringEntry = StringMapEntry< std::nullopt_t >
 StringEntry keeps data of the string: the length, external offset and a string body which is placed right after StringEntry.
 
using OffsetToUnitTy = function_ref< CompileUnit *(uint64_t Offset)>
 
using TranslatorFuncTy = std::function< StringRef(StringRef)>
 
using MessageHandlerTy = std::function< void(const Twine &Warning, StringRef Context, const DWARFDie *DIE)>
 
using MacroOffset2UnitMapTy = DenseMap< uint64_t, DwarfUnit * >
 
using OutSectionDataTy = SmallString< 0 >
 Type for section data.
 
using OffsetsPtrVector = SmallVector< uint64_t * >
 Type for list of pointers to patches offsets.
 

Enumerations

enum class  DebugSectionKind : uint8_t {
  DebugInfo = 0 , DebugLine , DebugFrame , DebugRange ,
  DebugRngLists , DebugLoc , DebugLocLists , DebugARanges ,
  DebugAbbrev , DebugMacinfo , DebugMacro , DebugAddr ,
  DebugStr , DebugLineStr , DebugStrOffsets , NumberOfEnumEntries
}
 List of tracked debug tables. More...
 

Functions

static bool childrenCanBeRemoved (uint32_t Tag)
 
static void resolveRelativeObjectPath (SmallVectorImpl< char > &Buf, DWARFDie CU)
 Resolve the relative path to a build artifact referenced by DWARF by applying DW_AT_comp_dir.
 
static uint64_t getDwoId (const DWARFDie &CUDie)
 
static std::string remapPath (StringRef Path, const DWARFLinker::ObjectPrefixMapTy &ObjectPrefixMap)
 
static std::string getPCMFile (const DWARFDie &CUDie, DWARFLinker::ObjectPrefixMapTy *ObjectPrefixMap)
 
const StringLiteralgetSectionName (DebugSectionKind SectionKind)
 Return the name of the section.
 
std::optional< DebugSectionKindparseDebugTableName (StringRef Name)
 Recognise the table name and match it with the DebugSectionKind.
 

Variables

static constexpr StringLiteral SectionNames [SectionKindsNum]
 
static constexpr size_t SectionKindsNum
 

Typedef Documentation

◆ MacroOffset2UnitMapTy

Definition at line 25 of file DWARFLinkerUnit.h.

◆ MessageHandlerTy

using llvm::dwarflinker_parallel::MessageHandlerTy = typedef std::function<void( const Twine &Warning, StringRef Context, const DWARFDie *DIE)>

Definition at line 24 of file DWARFLinkerGlobalData.h.

◆ OffsetsPtrVector

Type for list of pointers to patches offsets.

Definition at line 124 of file OutputSections.h.

◆ OffsetToUnitTy

Definition at line 20 of file DWARFLinkerCompileUnit.h.

◆ OutSectionDataTy

Type for section data.

Definition at line 121 of file OutputSections.h.

◆ RangesTy

Mapped value in the address map is the offset to apply to the linked address.

Definition at line 24 of file AddressesMap.h.

◆ StringEntry

StringEntry keeps data of the string: the length, external offset and a string body which is placed right after StringEntry.

Definition at line 24 of file StringPool.h.

◆ TranslatorFuncTy

Definition at line 23 of file DWARFLinkerGlobalData.h.

Enumeration Type Documentation

◆ DebugSectionKind

enum class llvm::dwarflinker_parallel::DebugSectionKind : uint8_t
strong

List of tracked debug tables.

Enumerator
DebugInfo 
DebugLine 
DebugFrame 
DebugRange 
DebugRngLists 
DebugLoc 
DebugLocLists 
DebugARanges 
DebugAbbrev 
DebugMacinfo 
DebugMacro 
DebugAddr 
DebugStr 
DebugLineStr 
DebugStrOffsets 
NumberOfEnumEntries 

Definition at line 34 of file OutputSections.h.

Function Documentation

◆ childrenCanBeRemoved()

static bool llvm::dwarflinker_parallel::childrenCanBeRemoved ( uint32_t  Tag)
static

◆ getDwoId()

static uint64_t llvm::dwarflinker_parallel::getDwoId ( const DWARFDie CUDie)
static

◆ getPCMFile()

static std::string llvm::dwarflinker_parallel::getPCMFile ( const DWARFDie CUDie,
DWARFLinker::ObjectPrefixMapTy ObjectPrefixMap 
)
static

◆ getSectionName()

const StringLiteral & llvm::dwarflinker_parallel::getSectionName ( DebugSectionKind  SectionKind)

Return the name of the section.

Definition at line 22 of file OutputSections.cpp.

References SectionNames.

Referenced by llvm::dwarflinker_parallel::SectionDescriptor::getName(), and parseDebugTableName().

◆ parseDebugTableName()

std::optional< DebugSectionKind > llvm::dwarflinker_parallel::parseDebugTableName ( llvm::StringRef  SecName)

◆ remapPath()

static std::string llvm::dwarflinker_parallel::remapPath ( StringRef  Path,
const DWARFLinker::ObjectPrefixMapTy ObjectPrefixMap 
)
static

Definition at line 196 of file DWARFLinkerImpl.cpp.

References llvm::sys::path::replace_path_prefix().

Referenced by getPCMFile().

◆ resolveRelativeObjectPath()

static void llvm::dwarflinker_parallel::resolveRelativeObjectPath ( SmallVectorImpl< char > &  Buf,
DWARFDie  CU 
)
static

Resolve the relative path to a build artifact referenced by DWARF by applying DW_AT_comp_dir.

Definition at line 183 of file DWARFLinkerImpl.cpp.

References llvm::sys::path::append(), and llvm::dwarf::toString().

Referenced by llvm::dwarflinker_parallel::DWARFLinkerImpl::LinkContext::loadClangModule().

Variable Documentation

◆ SectionKindsNum

constexpr size_t llvm::dwarflinker_parallel::SectionKindsNum
staticconstexpr
Initial value:
=
static_cast<size_t>(DebugSectionKind::NumberOfEnumEntries)

Definition at line 52 of file OutputSections.h.

◆ SectionNames

constexpr StringLiteral llvm::dwarflinker_parallel::SectionNames[SectionKindsNum]
staticconstexpr
Initial value:
= {
"debug_info", "debug_line", "debug_frame", "debug_ranges",
"debug_rnglists", "debug_loc", "debug_loclists", "debug_aranges",
"debug_abbrev", "debug_macinfo", "debug_macro", "debug_addr",
"debug_str", "debug_line_str", "debug_str_offsets"}

Definition at line 16 of file OutputSections.cpp.

Referenced by getSectionName().