Skip to content

Commit 404cc48

Browse files
Teemperoradrian-prantl
authored andcommitted
Adapt to API change that moved Sysroot attribute to CompileUnit
Commit 7b30370 changed the Sysroot attribute to the CompileUnit which broke the build. (cherry picked from commit 728e8a1)
1 parent d23082f commit 404cc48

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)