[all-commits] [llvm/llvm-project] 6c98a3: [lldb][NFC] Move XcodeSDK's sysroot into a separat...
Charles Zablit via All-commits
all-commits at lists.llvm.org
Tue Sep 22 08:02:34 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6c98a370c9b8e16618394b0862fff6ee66a555bb
https://github.com/llvm/llvm-project/commit/6c98a370c9b8e16618394b0862fff6ee66a555bb
Author: Charles Zablit <c_zablit at apple.com>
Date: 2026-09-22 (Tue, 22 Sep 2026)
Changed paths:
M lldb/include/lldb/Symbol/SymbolFile.h
M lldb/include/lldb/Symbol/SymbolFileOnDemand.h
M lldb/include/lldb/Target/Platform.h
M lldb/include/lldb/Utility/XcodeSDK.h
M lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
M lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h
M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
M lldb/source/Symbol/SymbolFileOnDemand.cpp
M lldb/source/Utility/XcodeSDK.cpp
M lldb/unittests/SymbolFile/DWARF/XcodeSDKModuleTests.cpp
M lldb/unittests/Utility/XcodeSDKTest.cpp
Log Message:
-----------
[lldb][NFC] Move XcodeSDK's sysroot into a separate XcodeSDKAndSysroot class (#224361)
`XcodeSDK` carried two unrelated things: the SDK identity parsed out of
an SDK directory name (`"MacOSX14.0.sdk"`), and the sysroot the compiler
recorded in `DW_AT_LLVM_sysroot`. The second is an absolute path on the
build machine and is only there when the SDK was read out of debug info.
Callers have no way to tell the two states apart.
This patch splits out `XcodeSDKAndSysroot`, which groups an `XcodeSDK`
with its sysroot. `XcodeSDK` keeps only the parsed SDK name, so
`XcodeSDK::Merge` no longer touches a sysroot.
`XcodeSDKAndSysroot::Merge` does that instead.
It follows the rules below:
- When the other SDK wins the merge, its sysroot comes with it.
- When merging only adds the `Internal` suffix to our own SDK name, the
sysroot is renamed alongside it, unless it does not name an SDK
directory.
rdar://171905747
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list