Skip to content

Adapt to API change that moved Sysroot attribute to CompileUnit #30367

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions lib/IRGen/IRGenDebugInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,8 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
}
}

StringRef Sysroot = IGM.Context.SearchPathOpts.SDKPath;
llvm::DIModule *M =
DBuilder.createModule(Parent, Name, ConfigMacros, RemappedIncludePath,
Sysroot);
DBuilder.createModule(Parent, Name, ConfigMacros, RemappedIncludePath);
DIModuleCache.insert({Key, llvm::TrackingMDNodeRef(M)});
return M;
}
Expand Down Expand Up @@ -1697,13 +1695,18 @@ IRGenDebugInfoImpl::IRGenDebugInfoImpl(const IRGenOptions &Opts,
DBuilder.createFile(DebugPrefixMap.remapPath(SourcePath),
DebugPrefixMap.remapPath(Opts.DebugCompilationDir));

StringRef Sysroot = IGM.Context.SearchPathOpts.SDKPath;
TheCU = DBuilder.createCompileUnit(
Lang, MainFile,
Producer, Opts.shouldOptimize(), Opts.getDebugFlags(PD),
MajorRuntimeVersion, SplitName,
Opts.DebugInfoLevel > IRGenDebugInfoLevel::LineTables
? llvm::DICompileUnit::FullDebug
: llvm::DICompileUnit::LineTablesOnly);
: llvm::DICompileUnit::LineTablesOnly,
/* DWOId */ 0, /* SplitDebugInlining */ true,
/* DebugInfoForProfiling */ false,
llvm::DICompileUnit::DebugNameTableKind::Default,
/* RangesBaseAddress */ false, Sysroot);

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