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


class  AcceleratorRecordsSaver
 This class helps to store information for accelerator entries. More...
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  AttributesInfo
 Information gathered and exchanged between the various clone*Attr helpers about the attributes of a particular DIE. 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...
struct  DebugDieTypeRefPatch
 This structure is used to update reference to the type 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  DebugType2TypeDieRefPatch
 This structure is used to update reference to the type DIE. More...
struct  DebugTypeDeclFilePatch
struct  DebugTypeLineStrPatch
struct  DebugTypeStrPatch
struct  DebugULEB128DieRefPatch
 This structure is used to update reference to the DIE of ULEB128 form. More...
class  DependencyTracker
 This class discovers DIEs dependencies: marks "live" DIEs, marks DIE locations (whether DIE should be cloned as regular DIE or it should be put into the artificial type unit). 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  OrderedChildrenIndexAssigner
 This class helps to assign indexes for DIE children. 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
class  SyntheticTypeNameBuilder
 The helper class to build type name based on DIE properties. More...
class  TypeEntryBody
 Keeps cloned data for the type DIE. More...
class  TypeEntryInfo
class  TypePool
 TypePool keeps type descriptors which contain partially cloned DIE correspinding to each type. More...
class  TypeUnit
 Type Unit is used to represent an artificial compilation unit which keeps all type information. More...
struct  UnitEntryPairTy
 This is a helper structure which keeps a debug info entry with it's containing compilation unit. More...


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 DebugNamesUnitsOffsets = std::vector< std::variant< MCSymbol *, uint64_t > >
using CompUnitIDToIdx = DenseMap< unsigned, unsigned >
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.
using TypeEntry = StringMapEntry< std::atomic< TypeEntryBody * > >


enum  ResolveInterCUReferencesMode : bool { Resolve = true , AvoidResolving = false }
enum class  DebugSectionKind : uint8_t {
  DebugInfo = 0 , DebugLine , DebugFrame , DebugRange ,
  DebugRngLists , DebugLoc , DebugLocLists , DebugARanges ,
  DebugAbbrev , DebugMacinfo , DebugMacro , DebugAddr ,
  DebugStr , DebugLineStr , DebugStrOffsets , DebugPubNames ,
  DebugPubTypes , DebugNames , AppleNames , AppleNamespaces ,
  AppleObjC , AppleTypes , NumberOfEnumEntries
 List of tracked debug tables. More...


static uint32_t hashFullyQualifiedName (CompileUnit &InputCU, DWARFDie &InputDIE, int ChildRecurseDepth=0)
static bool isNamespaceLikeEntry (const DWARFDebugInfoEntry *Entry)
bool isAlreadyMarked (const CompileUnit::DIEInfo &Info, CompileUnit::DieOutputPlacement NewPlacement)
bool isAlreadyMarked (const UnitEntryPairTy &Entry, CompileUnit::DieOutputPlacement NewPlacement)
static CompileUnit::DieOutputPlacement getFinalPlacementForEntry (const UnitEntryPairTy &Entry, CompileUnit::DieOutputPlacement Placement)
ArrayRef< dwarf::AttributegetODRAttributes ()
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)
bool isODRLanguage (uint16_t Language)
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.
static std::optional< UnitEntryPairTygetTypeDeduplicationCandidate (UnitEntryPairTy UnitEntryPair)
Error finiteLoop (function_ref< Expected< bool >()> Iteration, size_t MaxCounter=100000)
 This function calls Iteration() until it returns false.


static constexpr StringLiteral SectionNames [SectionKindsNum]
static constexpr size_t SectionKindsNum
static dwarf::Attribute TypeAttr [] = {dwarf::DW_AT_type}

Typedef Documentation

◆ CompUnitIDToIdx

Definition at line 42 of file DWARFEmitterImpl.h.

◆ DebugNamesUnitsOffsets

using llvm::dwarflinker_parallel::DebugNamesUnitsOffsets = typedef std::vector<std::variant<MCSymbol *, uint64_t> >

Definition at line 41 of file DWARFEmitterImpl.h.

◆ 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 25 of file DWARFLinkerGlobalData.h.

◆ OffsetsPtrVector

Type for list of pointers to patches offsets.

Definition at line 180 of file OutputSections.h.

◆ OffsetToUnitTy

Definition at line 19 of file DWARFLinkerCompileUnit.h.

◆ OutSectionDataTy

Type for section data.

Definition at line 177 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 24 of file DWARFLinkerGlobalData.h.

◆ TypeEntry

Definition at line 26 of file TypePool.h.

Enumeration Type Documentation

◆ DebugSectionKind

enum class llvm::dwarflinker_parallel::DebugSectionKind : uint8_t

List of tracked debug tables.


Definition at line 37 of file OutputSections.h.

◆ ResolveInterCUReferencesMode


Definition at line 43 of file DWARFLinkerCompileUnit.h.

Function Documentation

◆ finiteLoop()

Error llvm::dwarflinker_parallel::finiteLoop ( function_ref< Expected< bool >()>  Iteration,
size_t  MaxCounter = 100000 

This function calls Iteration() until it returns false.

If number of iterations exceeds MaxCounter then an Error is returned. This function should be used for loops which assumed to have number of iterations significantly smaller than MaxCounter to avoid infinite looping in error cases.

Definition at line 22 of file Utils.h.

References llvm::createStringError(), llvm::Expected< T >::get(), llvm::Error::success(), and llvm::Expected< T >::takeError().

Referenced by hashFullyQualifiedName(), llvm::dwarflinker_parallel::DWARFLinkerImpl::LinkContext::link(), and llvm::dwarflinker_parallel::DWARFLinkerImpl::LinkContext::linkSingleCompileUnit().

◆ getDwoId()

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

◆ getFinalPlacementForEntry()

static CompileUnit::DieOutputPlacement llvm::dwarflinker_parallel::getFinalPlacementForEntry ( const UnitEntryPairTy Entry,
CompileUnit::DieOutputPlacement  Placement 

◆ getODRAttributes()

ArrayRef< dwarf::Attribute > llvm::dwarflinker_parallel::getODRAttributes ( )
list of attributes referencing type DIEs which might be deduplicated. Note: it does not include DW_AT_containing_type attribute to avoid infinite recursion.

Definition at line 1873 of file DWARFLinkerCompileUnit.cpp.

Referenced by llvm::dwarflinker_parallel::SyntheticTypeNameBuilder::addTypeName(), and llvm::dwarflinker_parallel::DependencyTracker::maybeAddReferencedRoots().

◆ getPCMFile()

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

◆ getSectionName()

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

◆ getTypeDeduplicationCandidate()

static std::optional< UnitEntryPairTy > llvm::dwarflinker_parallel::getTypeDeduplicationCandidate ( UnitEntryPairTy  UnitEntryPair)

◆ hashFullyQualifiedName()

static uint32_t llvm::dwarflinker_parallel::hashFullyQualifiedName ( CompileUnit InputCU,
int  ChildRecurseDepth = 0 

◆ isAlreadyMarked() [1/2]

bool llvm::dwarflinker_parallel::isAlreadyMarked ( const CompileUnit::DIEInfo Info,
CompileUnit::DieOutputPlacement  NewPlacement 

◆ isAlreadyMarked() [2/2]

bool llvm::dwarflinker_parallel::isAlreadyMarked ( const UnitEntryPairTy Entry,
CompileUnit::DieOutputPlacement  NewPlacement 

Definition at line 323 of file DependencyTracker.cpp.

References isAlreadyMarked().

◆ isNamespaceLikeEntry()

static bool llvm::dwarflinker_parallel::isNamespaceLikeEntry ( const DWARFDebugInfoEntry Entry)

◆ isODRLanguage()

bool llvm::dwarflinker_parallel::isODRLanguage ( uint16_t  Language)

◆ 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 

Definition at line 290 of file DWARFLinkerImpl.cpp.

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

Referenced by getPCMFile().

◆ resolveRelativeObjectPath()

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

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

Definition at line 277 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
Initial value:

Definition at line 62 of file OutputSections.h.

◆ SectionNames

constexpr StringLiteral llvm::dwarflinker_parallel::SectionNames[SectionKindsNum]
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", "debug_pubnames",
"debug_pubtypes", "debug_names", "apple_names", "apple_namespac",
"apple_objc", "apple_types"}

Definition at line 17 of file OutputSections.cpp.

Referenced by getSectionName().

◆ TypeAttr

dwarf::Attribute llvm::dwarflinker_parallel::TypeAttr[] = {dwarf::DW_AT_type}