9#ifndef LLVM_DWARFLINKER_UTILS_H
10#define LLVM_DWARFLINKER_UTILS_H
56 const DWARFDebugLine::LineTable <,
57 ArrayRef<uint64_t> SortedStmtSeqOffsets,
58 DenseMap<uint64_t, uint64_t> &SeqOffToFirstRow);
66 size_t MaxCounter = 100000) {
67 size_t iterationsCounter = 0;
68 while (iterationsCounter++ < MaxCounter) {
70 if (!IterationResultOrError)
71 return IterationResultOrError.
takeError();
72 if (!IterationResultOrError.
get())
84 if (it == end || !it->ends_with(
".sdk"))
88 if (it == end || *it !=
"SDKs")
90 auto developerEnd = it;
94 if (*it !=
"Developer")
99 if (*it ==
"Contents")
103 if (!it->ends_with(
".platform"))
107 if (it == end || *it !=
"Platforms")
120 if (it->ends_with(
".xctoolchain")) {
124 if (*it !=
"Toolchains")
129 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....
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.