LLVM 19.0.0git
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
llvm::dwarf_linker Namespace Reference

Namespaces

namespace  classic
 
namespace  parallel
 

Classes

class  AddressesMap
 AddressesMap represents information about valid addresses used by debug information. More...
 
class  DWARFFile
 This class represents DWARF information for source file and it's address map. More...
 
class  DWARFLinkerBase
 The base interface for DWARFLinker implementations. More...
 
class  IndexedValuesMap
 This class stores values sequentually and assigns index to the each value. 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.
 

Enumerations

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...
 

Functions

static constexpr 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.
 
Error finiteLoop (function_ref< Expected< bool >()> Iteration, size_t MaxCounter=100000)
 This function calls Iteration() until it returns false.
 
SmallString< 128 > guessToolchainBaseDir (StringRef SysRoot)
 Make a best effort to guess the Xcode.app/Contents/Developer/Toolchains/ path from an SDK path.
 
bool isPathAbsoluteOnWindowsOrPosix (const Twine &Path)
 

Variables

static constexpr size_t SectionKindsNum
 
static constexpr StringLiteral SectionNames [SectionKindsNum]
 

Typedef Documentation

◆ 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

using llvm::dwarf_linker::StringEntry = typedef StringMapEntry<std::nullopt_t>

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

Definition at line 23 of file StringPool.h.

Enumeration Type Documentation

◆ DebugSectionKind

enum class llvm::dwarf_linker::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 
DebugPubNames 
DebugPubTypes 
DebugNames 
AppleNames 
AppleNamespaces 
AppleObjC 
AppleTypes 
NumberOfEnumEntries 

Definition at line 27 of file DWARFLinkerBase.h.

Function Documentation

◆ finiteLoop()

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

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 26 of file Utils.h.

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

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

◆ getSectionName()

static constexpr const StringLiteral & llvm::dwarf_linker::getSectionName ( DebugSectionKind  SectionKind)
staticconstexpr

◆ guessToolchainBaseDir()

SmallString< 128 > llvm::dwarf_linker::guessToolchainBaseDir ( StringRef  SysRoot)
inline

Make a best effort to guess the Xcode.app/Contents/Developer/Toolchains/ path from an SDK path.

Definition at line 41 of file Utils.h.

References llvm::sampleprof::Base, llvm::sys::path::filename(), and llvm::sys::path::parent_path().

Referenced by llvm::dwarf_linker::parallel::CompileUnit::analyzeImportedModule(), and llvm::analyzeImportedModule().

◆ isPathAbsoluteOnWindowsOrPosix()

bool llvm::dwarf_linker::isPathAbsoluteOnWindowsOrPosix ( const Twine Path)
inline

◆ parseDebugTableName()

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

Recognise the table name and match it with the DebugSectionKind.

Definition at line 16 of file DWARFLinkerBase.cpp.

References Default, llvm::StringRef::find_first_not_of(), getSectionName(), and llvm::StringRef::substr().

Referenced by llvm::dwarf_linker::parallel::SectionDescriptor::setSizesForSectionCreatedByAsmPrinter().

Variable Documentation

◆ SectionKindsNum

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

Definition at line 53 of file DWARFLinkerBase.h.

◆ SectionNames

constexpr StringLiteral llvm::dwarf_linker::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", "debug_pubnames",
"debug_pubtypes", "debug_names", "apple_names", "apple_namespac",
"apple_objc", "apple_types"}

Definition at line 56 of file DWARFLinkerBase.h.

Referenced by llvm::DWARFFormValue::dumpAddressSection(), and getSectionName().