[cxx-interop] compilations that do not enable C++ interoperability should not be able to import modules that do enable C++ interoperability by default

A supplemental hidden frontend option allows advanced users to opt-out of this requirement.

Fixes https://github.com/apple/swift/issues/65833
Fixes https://github.com/apple/swift/issues/65832
This commit is contained in:
Alex Lorenz
2023-06-07 15:06:06 -07:00
parent 4d1d8a9de5
commit ba8d4d7801
18 changed files with 104 additions and 7 deletions

View File

@@ -646,6 +646,7 @@ ModuleDecl::ModuleDecl(Identifier name, ASTContext &ctx,
Bits.ModuleDecl.HasHermeticSealAtLink = 0;
Bits.ModuleDecl.IsConcurrencyChecked = 0;
Bits.ModuleDecl.ObjCNameLookupCachePopulated = 0;
Bits.ModuleDecl.HasCxxInteroperability = 0;
}
void ModuleDecl::setIsSystemModule(bool flag) {