mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #85043 from beccadax/mod-squad-interface
[SE-0491] Conditionally emit module selectors into swiftinterfaces
This commit is contained in:
@@ -1642,7 +1642,8 @@ void InterfaceSubContextDelegateImpl::inheritOptionsForBuildingInterface(
|
||||
FrontendOptions::ActionType requestedAction,
|
||||
const SearchPathOptions &SearchPathOpts, const LangOptions &LangOpts,
|
||||
const ClangImporterOptions &clangImporterOpts, const CASOptions &casOpts,
|
||||
bool suppressNotes, bool suppressRemarks) {
|
||||
bool suppressNotes, bool suppressRemarks,
|
||||
PrintDiagnosticNamesMode printDiagnosticNames) {
|
||||
GenericArgs.push_back("-frontend");
|
||||
// Start with a genericSubInvocation that copies various state from our
|
||||
// invoking ASTContext.
|
||||
@@ -1743,6 +1744,20 @@ void InterfaceSubContextDelegateImpl::inheritOptionsForBuildingInterface(
|
||||
GenericArgs.push_back("-suppress-remarks");
|
||||
}
|
||||
|
||||
// Inherit the parent invocation's setting for printing diagnostic IDs.
|
||||
genericSubInvocation.getDiagnosticOptions().PrintDiagnosticNames =
|
||||
printDiagnosticNames;
|
||||
switch (printDiagnosticNames) {
|
||||
case PrintDiagnosticNamesMode::None:
|
||||
break;
|
||||
case PrintDiagnosticNamesMode::Identifier:
|
||||
GenericArgs.push_back("-debug-diagnostic-names");
|
||||
break;
|
||||
case PrintDiagnosticNamesMode::Group:
|
||||
// FIXME: Currently no flag for Group mode
|
||||
break;
|
||||
}
|
||||
|
||||
// Inherit this setting down so that it can affect error diagnostics (mostly
|
||||
// by making them non-fatal).
|
||||
genericSubInvocation.getLangOptions().DebuggerSupport = LangOpts.DebuggerSupport;
|
||||
@@ -1849,7 +1864,8 @@ InterfaceSubContextDelegateImpl::InterfaceSubContextDelegateImpl(
|
||||
inheritOptionsForBuildingInterface(LoaderOpts.requestedAction, searchPathOpts,
|
||||
langOpts, clangImporterOpts, casOpts,
|
||||
Diags->getSuppressNotes(),
|
||||
Diags->getSuppressRemarks());
|
||||
Diags->getSuppressRemarks(),
|
||||
Diags->getPrintDiagnosticNamesMode());
|
||||
// Configure front-end input.
|
||||
auto &SubFEOpts = genericSubInvocation.getFrontendOptions();
|
||||
SubFEOpts.RequestedAction = LoaderOpts.requestedAction;
|
||||
|
||||
Reference in New Issue
Block a user