@@ -659,10 +659,8 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
659
659
}
660
660
}
661
661
662
- StringRef Sysroot = IGM.Context .SearchPathOpts .SDKPath ;
663
662
llvm::DIModule *M =
664
- DBuilder.createModule (Parent, Name, ConfigMacros, RemappedIncludePath,
665
- Sysroot);
663
+ DBuilder.createModule (Parent, Name, ConfigMacros, RemappedIncludePath);
666
664
DIModuleCache.insert ({Key, llvm::TrackingMDNodeRef (M)});
667
665
return M;
668
666
}
@@ -1692,6 +1690,7 @@ IRGenDebugInfoImpl::IRGenDebugInfoImpl(const IRGenOptions &Opts,
1692
1690
DBuilder.createFile (DebugPrefixMap.remapPath (SourcePath),
1693
1691
DebugPrefixMap.remapPath (Opts.DebugCompilationDir ));
1694
1692
1693
+ StringRef Sysroot = IGM.Context .SearchPathOpts .SDKPath ;
1695
1694
TheCU = DBuilder.createCompileUnit (
1696
1695
Lang, MainFile,
1697
1696
Producer, Opts.shouldOptimize (), Opts.getDebugFlags (PD),
@@ -1702,7 +1701,7 @@ IRGenDebugInfoImpl::IRGenDebugInfoImpl(const IRGenOptions &Opts,
1702
1701
/* DWOId */ 0 , /* SplitDebugInlining */ true ,
1703
1702
/* DebugInfoForProfiling */ false ,
1704
1703
llvm::DICompileUnit::DebugNameTableKind::Default,
1705
- /* RangesBaseAddress */ false );
1704
+ /* RangesBaseAddress */ false , Sysroot );
1706
1705
1707
1706
// Because the swift compiler relies on Clang to setup the Module,
1708
1707
// the clang CU is always created first. Several dwarf-reading
0 commit comments