Skip to content

Commit 0565209

Browse files
authored
Merge pull request #78657 from swiftlang/egorzhdan/6.1-coregraphics-workaround
🍒[cxx-interop] Workaround compiler error when importing CoreGraphics with C++ interop
2 parents eedae18 + 5665927 commit 0565209

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

lib/Frontend/ModuleInterfaceLoader.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2193,7 +2193,9 @@ InterfaceSubContextDelegateImpl::runInSubCompilerInstance(StringRef moduleName,
21932193

21942194
// FIXME: Hack for Darwin.swiftmodule, which cannot be rebuilt with C++
21952195
// interop enabled by the Swift CI because it uses an old host SDK.
2196-
if (moduleName == "Darwin") {
2196+
// FIXME: Hack for CoreGraphics.swiftmodule, which cannot be rebuilt because
2197+
// of a CF_OPTIONS bug (rdar://142762174).
2198+
if (moduleName == "Darwin" || moduleName == "CoreGraphics") {
21972199
subInvocation.getLangOptions().EnableCXXInterop = false;
21982200
subInvocation.getLangOptions().cxxInteropCompatVersion = {};
21992201
BuildArgs.erase(llvm::remove_if(BuildArgs,
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// RUN: %target-swift-frontend -typecheck -verify -I %S/Inputs -cxx-interoperability-mode=default %s
2+
3+
// REQUIRES: objc_interop
4+
// REQUIRES: VENDOR=apple
5+
6+
import CoreGraphics
7+
8+
var _: CGBitmapInfo! = nil
9+

0 commit comments

Comments
 (0)