[cxx-interop] implicitly imported CxxShim module should not force client modules to enable C++ interoperability

Fixes https://github.com/apple/swift/issues/65831
This commit is contained in:
Alex Lorenz
2023-05-11 15:16:25 -07:00
committed by Alex Lorenz
parent d7e18cb554
commit b17ade9391
6 changed files with 49 additions and 1 deletions

View File

@@ -1176,7 +1176,7 @@ ImplicitImportInfo CompilerInstance::getImplicitImportInfo() const {
}
if (Invocation.getLangOptions().EnableCXXInterop && canImportCxxShim()) {
pushImport(CXX_SHIM_NAME);
pushImport(CXX_SHIM_NAME, {ImportFlags::ImplementationOnly});
}
imports.ShouldImportUnderlyingModule = frontendOpts.ImportUnderlyingModule;