Skip to content

Commit f6443f0

Browse files
committed
fix test case for concurrency availability
1 parent abfccd1 commit f6443f0

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

test/Interop/SwiftToCxx/functions/swift-no-expose-unsupported-func.swift renamed to test/Interop/SwiftToCxx/functions/swift-no-expose-unsupported-alwaysEmitInClient-func.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,17 @@
55
// RUN: %check-interop-cxx-header-in-clang(%t/functions.h)
66

77
// CHECK-NOT: SWIFT_EXTERN bool $s9Functions24alwaysEmitIntoClientFuncyS2bF(bool x) SWIFT_NOEXCEPT SWIFT_CALL; // alwaysEmitIntoClientFunc(_:)
8-
// CHECK-NOT: SWIFT_EXTERN double $s9Functions9asyncFuncyS2dYaF(double x) SWIFT_NOEXCEPT SWIFT_CALL; // asyncFunc(_:)
98

109
// CHECK: namespace Functions {
1110
// CHECK-EMPTY:
1211
// CHECK-EMPTY:
1312
// CHECK-EMPTY:
1413
// CHECK-EMPTY:
15-
// CHECK-EMPTY:
16-
// CHECK-EMPTY:
1714
// CHECK-NEXT: } // namespace Functions
1815

1916
// CHECK-NOT: inline bool alwaysEmitIntoClientFunc(bool x) noexcept SWIFT_WARN_UNUSED_RESULT {
2017
// CHECK-NOT: return _impl::$s9Functions24alwaysEmitIntoClientFuncyS2bF(x);
2118
// CHECK-NOT: }
2219

23-
// CHECK-NOT: inline double asyncFunc(double x) noexcept SWIFT_WARN_UNUSED_RESULT {
24-
// CHECK-NOT: return _impl::$s9Functions9asyncFuncyS2dYaF(x);
25-
// CHECK-NOT: }
26-
27-
public func asyncFunc(_ x: Double) async -> Double { return 2 * x }
28-
2920
@_alwaysEmitIntoClient
3021
public func alwaysEmitIntoClientFunc(_ x: Bool) -> Bool { return !x }
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-swift-frontend %s -typecheck -module-name Functions -clang-header-expose-public-decls -emit-clang-header-path %t/functions.h
3+
// RUN: %FileCheck %s < %t/functions.h
4+
5+
// RUN: %check-interop-cxx-header-in-clang(%t/functions.h)
6+
7+
// CHECK-NOT: SWIFT_EXTERN double $s9Functions9asyncFuncyS2dYaF(double x) SWIFT_NOEXCEPT SWIFT_CALL; // asyncFunc(_:)
8+
9+
// CHECK: namespace Functions {
10+
// CHECK-EMPTY:
11+
// CHECK-EMPTY:
12+
// CHECK-EMPTY:
13+
// CHECK-EMPTY:
14+
// CHECK-NEXT: } // namespace Functions
15+
16+
// CHECK-NOT: inline double asyncFunc(double x) noexcept SWIFT_WARN_UNUSED_RESULT {
17+
// CHECK-NOT: return _impl::$s9Functions9asyncFuncyS2dYaF(x);
18+
// CHECK-NOT: }
19+
20+
// REQUIRES: concurrency
21+
22+
public func asyncFunc(_ x: Double) async -> Double { return 2 * x }

0 commit comments

Comments
 (0)