mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add workaround flag for lazy import-as-member
In rdar://123649082, a project failed to build because of the lazy import-as-member loading changes in #71320. That project was configured in a way that broke modularization and the correct solution is to fix it, but out of an abundance of caution, add a `-disable-named-lazy-import-as-member-loading` frontend flag in case a project needs to temporarily restore the old behavior. As a bonus, this lets us write a test to verify that lazy import-as-member loading has positive performance impact.
This commit is contained in:
@@ -623,6 +623,9 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
!Args.hasArg(OPT_disable_experimental_clang_importer_diagnostics) &&
|
||||
Args.hasArg(OPT_enable_experimental_eager_clang_module_diagnostics);
|
||||
|
||||
Opts.DisableNamedLazyImportAsMemberLoading |=
|
||||
Args.hasArg(OPT_disable_named_lazy_import_as_member_loading);
|
||||
|
||||
Opts.DisableImplicitConcurrencyModuleImport |=
|
||||
Args.hasArg(OPT_disable_implicit_concurrency_module_import);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user