@@ -681,8 +681,9 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
681
681
Opts.EnablePackageInterfaceLoad = Args.hasArg (OPT_experimental_package_interface_load) ||
682
682
::getenv (" SWIFT_ENABLE_PACKAGE_INTERFACE_LOAD" );
683
683
684
- Opts.EnableBypassResilienceInPackage = Args.hasArg (OPT_experimental_package_bypass_resilience) ||
685
- Opts.hasFeature (Feature::ClientBypassResilientAccessInPackage);
684
+ Opts.EnableBypassResilienceInPackage =
685
+ Args.hasArg (OPT_experimental_package_bypass_resilience) ||
686
+ Opts.hasFeature (Feature::ClientBypassResilientAccessInPackage);
686
687
687
688
Opts.DisableAvailabilityChecking |=
688
689
Args.hasArg (OPT_disable_availability_checking);
@@ -1115,20 +1116,22 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
1115
1116
1116
1117
if (Args.hasArg (OPT_enable_library_evolution)) {
1117
1118
Opts.SkipNonExportableDecls |=
1118
- Args.hasArg (OPT_experimental_skip_non_exportable_decls);
1119
+ Args.hasArg (OPT_experimental_skip_non_exportable_decls);
1119
1120
1120
1121
Opts.SkipNonExportableDecls |=
1121
- Args.hasArg (OPT_experimental_skip_non_inlinable_function_bodies) &&
1122
- Args.hasArg (OPT_experimental_skip_non_inlinable_function_bodies_is_lazy);
1122
+ Args.hasArg (OPT_experimental_skip_non_inlinable_function_bodies) &&
1123
+ Args.hasArg (
1124
+ OPT_experimental_skip_non_inlinable_function_bodies_is_lazy);
1123
1125
} else {
1124
1126
if (Args.hasArg (OPT_experimental_skip_non_exportable_decls))
1125
1127
Diags.diagnose (SourceLoc (), diag::ignoring_option_requires_option,
1126
1128
" -experimental-skip-non-exportable-decls" ,
1127
1129
" -enable-library-evolution" );
1128
1130
}
1129
1131
1130
- Opts.AllowNonResilientAccess = Args.hasArg (OPT_experimental_allow_non_resilient_access) ||
1131
- Opts.hasFeature (Feature::AllowNonResilientAccessInPackage);
1132
+ Opts.AllowNonResilientAccess =
1133
+ Args.hasArg (OPT_experimental_allow_non_resilient_access) ||
1134
+ Opts.hasFeature (Feature::AllowNonResilientAccessInPackage);
1132
1135
if (Opts.AllowNonResilientAccess ) {
1133
1136
// Override the option to skip non-exportable decls.
1134
1137
if (Opts.SkipNonExportableDecls ) {
@@ -1139,11 +1142,14 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
1139
1142
}
1140
1143
// If built from interface, non-resilient access should not be allowed.
1141
1144
if (Opts.AllowNonResilientAccess &&
1142
- (FrontendOpts.RequestedAction == FrontendOptions::ActionType::CompileModuleFromInterface ||
1143
- FrontendOpts.RequestedAction == FrontendOptions::ActionType::TypecheckModuleFromInterface)) {
1144
- Diags.diagnose (SourceLoc (), diag::warn_ignore_option_overriden_by,
1145
- " -experimental-allow-non-resilient-access" ,
1146
- " -compile-module-from-interface or -typecheck-module-from-interface" );
1145
+ (FrontendOpts.RequestedAction ==
1146
+ FrontendOptions::ActionType::CompileModuleFromInterface ||
1147
+ FrontendOpts.RequestedAction ==
1148
+ FrontendOptions::ActionType::TypecheckModuleFromInterface)) {
1149
+ Diags.diagnose (
1150
+ SourceLoc (), diag::warn_ignore_option_overriden_by,
1151
+ " -experimental-allow-non-resilient-access" ,
1152
+ " -compile-module-from-interface or -typecheck-module-from-interface" );
1147
1153
Opts.AllowNonResilientAccess = false ;
1148
1154
}
1149
1155
}
@@ -2140,11 +2146,9 @@ void parseExclusivityEnforcementOptions(const llvm::opt::Arg *A,
2140
2146
}
2141
2147
2142
2148
static bool ParseSILArgs (SILOptions &Opts, ArgList &Args,
2143
- IRGenOptions &IRGenOpts,
2144
- const FrontendOptions &FEOpts,
2149
+ IRGenOptions &IRGenOpts, const FrontendOptions &FEOpts,
2145
2150
const TypeCheckerOptions &TCOpts,
2146
- DiagnosticEngine &Diags,
2147
- LangOptions &LangOpts,
2151
+ DiagnosticEngine &Diags, LangOptions &LangOpts,
2148
2152
ClangImporterOptions &ClangOpts) {
2149
2153
using namespace options ;
2150
2154
@@ -2484,7 +2488,7 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
2484
2488
if (const Arg *A = Args.getLastArg (options::OPT_sanitize_EQ)) {
2485
2489
Opts.Sanitizers = parseSanitizerArgValues (
2486
2490
Args, A, LangOpts.Target , Diags,
2487
- /* sanitizerRuntimeLibExists= */ [](StringRef libName, bool shared) {
2491
+ /* sanitizerRuntimeLibExists= */ [](StringRef libName, bool shared) {
2488
2492
2489
2493
// The driver has checked the existence of the library
2490
2494
// already.
@@ -3332,8 +3336,7 @@ bool CompilerInvocation::parseArgs(
3332
3336
}
3333
3337
3334
3338
if (ParseSILArgs (SILOpts, ParsedArgs, IRGenOpts, FrontendOpts,
3335
- TypeCheckerOpts, Diags,
3336
- LangOpts, ClangImporterOpts)) {
3339
+ TypeCheckerOpts, Diags, LangOpts, ClangImporterOpts)) {
3337
3340
return true ;
3338
3341
}
3339
3342
0 commit comments