Skip to content

Commit 728e8a1

Browse files
committed
Adapt to API change that moved Sysroot attribute to CompileUnit
Commit 7b30370 changed the Sysroot attribute to the CompileUnit which broke the build.
1 parent f4d1cfd commit 728e8a1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/IRGen/IRGenDebugInfo.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -659,10 +659,8 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
659659
}
660660
}
661661

662-
StringRef Sysroot = IGM.Context.SearchPathOpts.SDKPath;
663662
llvm::DIModule *M =
664-
DBuilder.createModule(Parent, Name, ConfigMacros, RemappedIncludePath,
665-
Sysroot);
663+
DBuilder.createModule(Parent, Name, ConfigMacros, RemappedIncludePath);
666664
DIModuleCache.insert({Key, llvm::TrackingMDNodeRef(M)});
667665
return M;
668666
}
@@ -1692,6 +1690,7 @@ IRGenDebugInfoImpl::IRGenDebugInfoImpl(const IRGenOptions &Opts,
16921690
DBuilder.createFile(DebugPrefixMap.remapPath(SourcePath),
16931691
DebugPrefixMap.remapPath(Opts.DebugCompilationDir));
16941692

1693+
StringRef Sysroot = IGM.Context.SearchPathOpts.SDKPath;
16951694
TheCU = DBuilder.createCompileUnit(
16961695
Lang, MainFile,
16971696
Producer, Opts.shouldOptimize(), Opts.getDebugFlags(PD),
@@ -1702,7 +1701,7 @@ IRGenDebugInfoImpl::IRGenDebugInfoImpl(const IRGenOptions &Opts,
17021701
/* DWOId */ 0, /* SplitDebugInlining */ true,
17031702
/* DebugInfoForProfiling */ false,
17041703
llvm::DICompileUnit::DebugNameTableKind::Default,
1705-
/* RangesBaseAddress */ false);
1704+
/* RangesBaseAddress */ false, Sysroot);
17061705

17071706
// Because the swift compiler relies on Clang to setup the Module,
17081707
// the clang CU is always created first. Several dwarf-reading

0 commit comments

Comments
 (0)