9#ifndef LLVM_DWARFLINKER_UTILS_H
10#define LLVM_DWARFLINKER_UTILS_H
53 function_ref<DWARFDie(
const DWARFDie &,
const DWARFFormValue &)>
67 const DWARFDebugLine::LineTable <,
68 ArrayRef<uint64_t> SortedStmtSeqOffsets,
69 DenseMap<uint64_t, uint64_t> &SeqOffToFirstRow);
77 size_t MaxCounter = 100000) {
78 size_t iterationsCounter = 0;
79 while (iterationsCounter++ < MaxCounter) {
81 if (!IterationResultOrError)
82 return IterationResultOrError.
takeError();
83 if (!IterationResultOrError.
get())
95 if (it == end || !it->ends_with(
".sdk"))
99 if (it == end || *it !=
"SDKs")
101 auto developerEnd = it;
105 if (*it !=
"Developer")
110 if (*it ==
"Contents")
114 if (!it->ends_with(
".platform"))
118 if (it == end || *it !=
"Platforms")
131 if (it->ends_with(
".xctoolchain")) {
135 if (*it !=
"Toolchains")
140 if (*it !=
"Developer")
This file defines the DenseMap class.
This file contains constants used for implementing Dwarf debug support.
This file defines the SmallString class.
Utility class that carries the DWARF compile/type unit and the debug info entry in an object.
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
Error takeError()
Take ownership of the stored error.
reference get()
Returns a reference to the stored T value.
Represent a constant reference to a string, i.e.
constexpr const char * data() const
Get a pointer to the start of the string (which may not be null terminated).
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
An efficient, type-erasing, non-owning reference to a callable.
LLVM_ABI bool isIdentifiedByChildren(dwarf::Tag Tag)
Test if an unnamed type with tag Tag is identified by its children, which tell it apart from other un...
StringRef guessDeveloperDir(StringRef SysRoot)
Make a best effort to guess the Xcode.app/Contents/Developer path from an SDK path.
LLVM_ABI bool hasImplicitAddressLocation(const DWARFDie &Die)
Test if the location of variable Die contains a global address but only uses to compute the variable'...
LLVM_ABI 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....
LLVM_ABI uint32_t hashFullyQualifiedName(DWARFDie Die, function_ref< DWARFDie(const DWARFDie &, const DWARFFormValue &)> ResolveRef)
Hash the fully qualified name of type Die for the Apple accelerator tables.
bool isInToolchainDir(StringRef Path)
Make a best effort to determine whether Path is inside a toolchain.
Error finiteLoop(function_ref< Expected< bool >()> Iteration, size_t MaxCounter=100000)
This function calls Iteration() until it returns false.
LLVM_ABI bool isStaticDataMember(const DWARFDie &Die)
Test if the DW_TAG_member Die is a DWARF 2-4 style static data member: a declaration with no storage ...
bool isPathAbsoluteOnWindowsOrPosix(const Twine &Path)
LLVM_ABI bool isIdentifyingChild(const DWARFDie &Die)
Test if Die is a child that identifies its unnamed parent type.
LLVM_ABI bool is_absolute(const Twine &path, Style style=Style::native)
Is path absolute?
LLVM_ABI reverse_iterator rend(StringRef path LLVM_LIFETIME_BOUND)
Get reverse end iterator over path.
LLVM_ABI reverse_iterator rbegin(StringRef path LLVM_LIFETIME_BOUND, Style style=Style::native)
Get reverse begin iterator over path.
This is an optimization pass for GlobalISel generic memory operations.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.