[cxx-interop] Remove a workaround for CoreGraphics module interface

CoreGraphics can now be rebuilt with C++ interop enabled, which makes this workaround obsolete.

rdar://150211857
(cherry picked from commit 571bd8e9d9)
This commit is contained in:
Egor Zhdan
2025-04-29 22:02:47 +01:00
parent 75181f9fa7
commit bfaef5df22

View File

@@ -2132,19 +2132,6 @@ InterfaceSubContextDelegateImpl::runInSubCompilerInstance(StringRef moduleName,
subInvocation.setSysRoot(sysroot.value());
}
// FIXME: Hack for CoreGraphics.swiftmodule, which cannot be rebuilt because
// of a CF_OPTIONS bug (rdar://142762174).
if (moduleName == "CoreGraphics") {
subInvocation.getLangOptions().EnableCXXInterop = false;
subInvocation.getLangOptions().cxxInteropCompatVersion = {};
BuildArgs.erase(llvm::remove_if(BuildArgs,
[](StringRef arg) -> bool {
return arg.starts_with(
"-cxx-interoperability-mode=");
}),
BuildArgs.end());
}
// Calculate output path of the module.
SwiftInterfaceModuleOutputPathResolution::ResultTy resolvedOutputPath;
getCachedOutputPath(resolvedOutputPath, moduleName, interfacePath, sdkPath);