mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ClangImporter] Set the debug info level to full debug info.
Upstream clang has introduced a new default level for Linux that sits between no debug info and full debug info.
This commit is contained in:
@@ -1377,6 +1377,8 @@ std::unique_ptr<ClangImporter> ClangImporter::create(
|
|||||||
// The Clang modules produced by ClangImporter are always embedded in an
|
// The Clang modules produced by ClangImporter are always embedded in an
|
||||||
// ObjectFilePCHContainer and contain -gmodules debug info.
|
// ObjectFilePCHContainer and contain -gmodules debug info.
|
||||||
importer->Impl.Invocation->getCodeGenOpts().DebugTypeExtRefs = true;
|
importer->Impl.Invocation->getCodeGenOpts().DebugTypeExtRefs = true;
|
||||||
|
importer->Impl.Invocation->getCodeGenOpts().setDebugInfo(
|
||||||
|
llvm::codegenoptions::FullDebugInfo);
|
||||||
|
|
||||||
auto PCHContainerOperations =
|
auto PCHContainerOperations =
|
||||||
std::make_shared<clang::PCHContainerOperations>();
|
std::make_shared<clang::PCHContainerOperations>();
|
||||||
|
|||||||
@@ -2089,6 +2089,12 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
|
|||||||
GenericArgs.push_back("-enable-experimental-feature");
|
GenericArgs.push_back("-enable-experimental-feature");
|
||||||
GenericArgs.push_back("Embedded");
|
GenericArgs.push_back("Embedded");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (langOpts.DebuggerSupport) {
|
||||||
|
subClangImporterOpts.ExtraArgs.push_back("-gmodules");
|
||||||
|
subClangImporterOpts.ExtraArgs.push_back("-g");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Calculate an output filename in \p genericSubInvocation's cache path that
|
/// Calculate an output filename in \p genericSubInvocation's cache path that
|
||||||
|
|||||||
Reference in New Issue
Block a user