mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 05:32:28 +08:00
Add an explicit API to read the Xcode SDK DWARF attribute from compile units
When debugging from a SymbolMap the creation of CompileUnits for the individual object files is so lazy that RegisterXcodeSDK() is not invoked at all before the Swift TypeSystem wants to read it. This patch fixes this by introducing an explicit SymbolFile::ParseXcodeSDK() call that can be invoked deterministically before the result is required. <rdar://problem/62532151+62326862> https://reviews.llvm.org/D79273
This commit is contained in:
@@ -1598,9 +1598,6 @@ bool Module::RemapSourceFile(llvm::StringRef path,
|
||||
|
||||
void Module::RegisterXcodeSDK(llvm::StringRef sdk_name, llvm::StringRef sysroot) {
|
||||
XcodeSDK sdk(sdk_name.str());
|
||||
if (m_xcode_sdk == sdk)
|
||||
return;
|
||||
m_xcode_sdk.Merge(sdk);
|
||||
PlatformSP module_platform =
|
||||
Platform::GetPlatformForArchitecture(GetArchitecture(), nullptr);
|
||||
ConstString sdk_path(module_platform->GetSDKPath(sdk));
|
||||
|
||||
Reference in New Issue
Block a user