|
LLVM 23.0.0git
|
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<EmptyStringSetTag> |
| 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 StringLiteral & | getSectionName (DebugSectionKind SectionKind) |
| Return the name of the section. | |
| LLVM_ABI std::optional< DebugSectionKind > | parseDebugTableName (StringRef Name) |
| Recognise the table name and match it with the DebugSectionKind. | |
| void | buildStmtSeqOffsetToFirstRowIndex (const DWARFDebugLine::LineTable <, ArrayRef< uint64_t > SortedStmtSeqOffsets, DenseMap< uint64_t, uint64_t > &SeqOffToFirstRow) |
Build a map from an input DW_AT_LLVM_stmt_sequence byte offset to the first-row index (in LT.Rows) of the corresponding line-table sequence. | |
| Error | finiteLoop (function_ref< Expected< bool >()> Iteration, size_t MaxCounter=100000) |
This function calls Iteration() until it returns false. | |
| StringRef | guessDeveloperDir (StringRef SysRoot) |
| Make a best effort to guess the Xcode.app/Contents/Developer path from an SDK path. | |
| bool | isInToolchainDir (StringRef Path) |
| Make a best effort to determine whether Path is inside a toolchain. | |
| bool | isPathAbsoluteOnWindowsOrPosix (const Twine &Path) |
Variables | |
| static constexpr size_t | SectionKindsNum |
| static constexpr StringLiteral | SectionNames [SectionKindsNum] |
Mapped value in the address map is the offset to apply to the linked address.
Definition at line 24 of file AddressesMap.h.
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.
|
strong |
List of tracked debug tables.
Definition at line 28 of file DWARFLinkerBase.h.
| void llvm::dwarf_linker::buildStmtSeqOffsetToFirstRowIndex | ( | const DWARFDebugLine::LineTable & | LT, |
| ArrayRef< uint64_t > | SortedStmtSeqOffsets, | ||
| DenseMap< uint64_t, uint64_t > & | SeqOffToFirstRow ) |
Build a map from an input DW_AT_LLVM_stmt_sequence byte offset to the first-row index (in LT.Rows) of the corresponding line-table sequence.
Seeds the map from LT.Sequences (the DWARF parser's discovered sequences), then augments it by walking row boundaries (DW_LNE_end_sequence markers) and matching them against the sorted input offsets in SortedStmtSeqOffsets, using the parser's results as ground-truth anchors. This recovers sequences the parser may not have registered and keeps the classic and parallel DWARFLinkers in lockstep. Caller passes SortedStmtSeqOffsets sorted ascending and deduplicated.
Definition at line 17 of file Utils.cpp.
References llvm::ArrayRef(), llvm::ArrayRef< T >::consume_front(), llvm::ArrayRef< T >::drop_front(), llvm::ArrayRef< T >::drop_while(), llvm::ArrayRef< T >::empty(), llvm::enumerate(), llvm::DWARFDebugLine::Sequence::FirstRowIndex, llvm::ArrayRef< T >::front(), I, N, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::DWARFDebugLine::Sequence::StmtSeqOffset.
Referenced by llvm::constructSeqOffsettoOrigRowMapping().
|
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 44 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().
|
staticconstexpr |
Return the name of the section.
Definition at line 67 of file DWARFLinkerBase.h.
References SectionNames.
Referenced by llvm::dwarf_linker::parallel::SectionDescriptorBase::getName(), llvm::dwarf_linker::parallel::OutputSections::getSectionDescriptor(), llvm::dwarf_linker::parallel::OutputSections::getSectionDescriptor(), llvm::object::ELFFile< ELFT >::getSectionName(), llvm::object::ELFObjectFile< ELFT >::isDebugSection(), and parseDebugTableName().
Make a best effort to guess the Xcode.app/Contents/Developer path from an SDK path.
Definition at line 59 of file Utils.h.
References llvm::StringRef::data(), llvm::sys::path::rbegin(), and llvm::sys::path::rend().
Referenced by llvm::analyzeImportedModule(), and llvm::dwarf_linker::parallel::CompileUnit::analyzeImportedModule().
Make a best effort to determine whether Path is inside a toolchain.
Definition at line 95 of file Utils.h.
References llvm::sys::path::rbegin(), and llvm::sys::path::rend().
Referenced by llvm::analyzeImportedModule(), and llvm::dwarf_linker::parallel::CompileUnit::analyzeImportedModule().
Definition at line 116 of file Utils.h.
References llvm::sys::path::is_absolute(), llvm::sys::path::posix, and llvm::sys::path::windows.
Referenced by llvm::dwarf_linker::parallel::CompileUnit::getDirAndFilenameFromLineTable(), and llvm::DWARFDebugLine::Prologue::getFileNameByIndex().
| 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 AppleNames, AppleNamespaces, AppleObjC, AppleTypes, llvm::StringSwitch< T, R >::Case(), DebugAbbrev, DebugAddr, DebugARanges, DebugFrame, DebugInfo, DebugLine, DebugLineStr, DebugLoc, DebugLocLists, DebugMacinfo, DebugMacro, DebugNames, DebugPubNames, DebugPubTypes, DebugRange, DebugRngLists, DebugStr, DebugStrOffsets, llvm::StringSwitch< T, R >::Default(), llvm::StringRef::find_first_not_of(), getSectionName(), and llvm::StringRef::substr().
Referenced by llvm::dwarf_linker::parallel::SectionDescriptor::setSizesForSectionCreatedByAsmPrinter().
|
staticconstexpr |
Definition at line 54 of file DWARFLinkerBase.h.
|
staticconstexpr |
Definition at line 57 of file DWARFLinkerBase.h.
Referenced by llvm::DWARFFormValue::dumpAddressSection(), and getSectionName().