Skip to content

Commit 80820cc

Browse files
authored
Merge pull request #30367 from adrian-prantl/sdk-5.3
Adapt to API change that moved Sysroot attribute to CompileUnit
2 parents ddaad60 + 404cc48 commit 80820cc

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/IRGen/IRGenDebugInfo.cpp

Lines changed: 7 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
}
@@ -1697,13 +1695,18 @@ IRGenDebugInfoImpl::IRGenDebugInfoImpl(const IRGenOptions &Opts,
16971695
DBuilder.createFile(DebugPrefixMap.remapPath(SourcePath),
16981696
DebugPrefixMap.remapPath(Opts.DebugCompilationDir));
16991697

1698+
StringRef Sysroot = IGM.Context.SearchPathOpts.SDKPath;
17001699
TheCU = DBuilder.createCompileUnit(
17011700
Lang, MainFile,
17021701
Producer, Opts.shouldOptimize(), Opts.getDebugFlags(PD),
17031702
MajorRuntimeVersion, SplitName,
17041703
Opts.DebugInfoLevel > IRGenDebugInfoLevel::LineTables
17051704
? llvm::DICompileUnit::FullDebug
1706-
: llvm::DICompileUnit::LineTablesOnly);
1705+
: llvm::DICompileUnit::LineTablesOnly,
1706+
/* DWOId */ 0, /* SplitDebugInlining */ true,
1707+
/* DebugInfoForProfiling */ false,
1708+
llvm::DICompileUnit::DebugNameTableKind::Default,
1709+
/* RangesBaseAddress */ false, Sysroot);
17071710

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

0 commit comments

Comments
 (0)