diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2024-01-11 18:24:21 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-01-11 18:24:21 +0000 |
| commit | 950076cd18f3fa9d789b4add9d405898efff09a5 (patch) | |
| tree | 2454649366290c6292cc2d94dde042f71bc1e144 /llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp | |
| parent | aca2e42c67292825f835f094eb0c4df5ce6013db (diff) | |
Diffstat (limited to 'llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp')
| -rw-r--r-- | llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp b/llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp index ffcf9f365aec..6ed284a66a85 100644 --- a/llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp +++ b/llvm/lib/DWARFLinker/Parallel/DWARFLinkerCompileUnit.cpp @@ -12,6 +12,7 @@ #include "DIEGenerator.h" #include "DependencyTracker.h" #include "SyntheticTypeNameBuilder.h" +#include "llvm/DWARFLinker/Utils.h" #include "llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h" #include "llvm/DebugInfo/DWARF/DWARFDebugMacro.h" #include "llvm/Support/DJB.h" @@ -247,20 +248,6 @@ void CompileUnit::cleanupDataAfterClonning() { getOrigUnit().clear(); } -/// Make a best effort to guess the -/// Xcode.app/Contents/Developer/Toolchains/ path from an SDK path. -static SmallString<128> guessToolchainBaseDir(StringRef SysRoot) { - SmallString<128> Result; - // Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk - StringRef Base = sys::path::parent_path(SysRoot); - if (sys::path::filename(Base) != "SDKs") - return Result; - Base = sys::path::parent_path(Base); - Result = Base; - Result += "/Toolchains"; - return Result; -} - /// Collect references to parseable Swift interfaces in imported /// DW_TAG_module blocks. void CompileUnit::analyzeImportedModule(const DWARFDebugInfoEntry *DieEntry) { @@ -1698,14 +1685,6 @@ CompileUnit::getDirAndFilenameFromLineTable( return getDirAndFilenameFromLineTable(FileIdx); } -static bool isPathAbsoluteOnWindowsOrPosix(const Twine &Path) { - // Debug info can contain paths from any OS, not necessarily - // an OS we're currently running on. Moreover different compilation units can - // be compiled on different operating systems and linked together later. - return sys::path::is_absolute(Path, sys::path::Style::posix) || - sys::path::is_absolute(Path, sys::path::Style::windows); -} - std::optional<std::pair<StringRef, StringRef>> CompileUnit::getDirAndFilenameFromLineTable(uint64_t FileIdx) { FileNamesCache::iterator FileData = FileNames.find(FileIdx); |
