Skip to content

Commit 6d0dd0e

Browse files
committed
[interop][SwiftToCxx] workaround windows failure with Error new use in SwiftToCxxToSwift/hide-swift-module-namespace-in-swift.swift
1 parent 2c9e807 commit 6d0dd0e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/PrintAsClang/_SwiftStdlibCxxOverlay.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ inline const void *_Nullable getErrorMetadata() {
132132
return ptr2;
133133
}
134134

135+
#ifndef SWIFT_CXX_INTEROP_HIDE_SWIFT_ERROR
136+
135137
class Error {
136138
public:
137139
Error() {}
@@ -369,4 +371,6 @@ using ThrowingResult = Swift::Expected<T>;
369371

370372
#endif
371373

374+
#endif // SWIFT_CXX_INTEROP_HIDE_SWIFT_ERROR
375+
372376
#endif

test/Interop/SwiftToCxxToSwift/hide-swift-module-namespace-in-swift.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
// RUN: %FileCheck %s < %t/swiftMod.h
77

8-
// RUN: %target-swift-frontend -typecheck %t/swiftMod.swift -typecheck -module-name SwiftMod -emit-clang-header-path %t/swiftMod2.h -I %t -enable-experimental-cxx-interop
8+
// RUN: %target-swift-frontend -typecheck %t/swiftMod.swift -typecheck -module-name SwiftMod -emit-clang-header-path %t/swiftMod2.h -I %t -enable-experimental-cxx-interop -Xcc -DSWIFT_CXX_INTEROP_HIDE_SWIFT_ERROR
99

1010
// RUN: %check-interop-cxx-header-in-clang(%t/swiftMod2.h -DSWIFT_CXX_INTEROP_HIDE_STL_OVERLAY -Wno-error)
1111

0 commit comments

Comments
 (0)