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:
Becca Royal-Gordon
2024-03-01 14:44:16 -08:00
parent 1a97803c8c
commit 54fd4b01b6
7 changed files with 50 additions and 3 deletions

View File

@@ -377,6 +377,11 @@ namespace swift {
/// Enable experimental eager Clang module diagnostics.
bool EnableExperimentalEagerClangModuleDiagnostics = false;
/// Force ClangImporter's import-as-member extensions to load thier members
/// immediately, bypassing their SwiftLookupTables. This emulates an
/// implementation quirk of previous compilers.
bool DisableNamedLazyImportAsMemberLoading = false;
/// Enable inference of Sendable conformances for public types.
bool EnableInferPublicSendable = false;