Skip to content

Commit c864087

Browse files
committed
[interop][SwiftToCxx] add a test that verifies that we can emit C++ header from previously built swiftmodule
1 parent d23a64e commit c864087

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-swift-frontend %s -emit-module -module-name Core -o %t
3+
// RUN: %target-swift-frontend -parse-as-library %t/Core.swiftmodule -typecheck -module-name Core -clang-header-expose-public-decls -emit-clang-header-path %t/core.h
4+
// RUN: %FileCheck %s < %t/core.h
5+
6+
// RUN: %empty-directory(%t-evo)
7+
// RUN: %target-swift-frontend %s -emit-module -enable-library-evolution -module-name Core -o %t-evo
8+
// RUN: %target-swift-frontend -parse-as-library %t-evo/Core.swiftmodule -enable-library-evolution -typecheck -module-name Core -clang-header-expose-public-decls -emit-clang-header-path %t-evo/core.h
9+
// RUN: %FileCheck %s < %t-evo/core.h
10+
11+
12+
public func reprintedInImportedModule() -> Int {
13+
return 42
14+
}
15+
16+
// CHECK: namespace Core {
17+
// CHECK: swift::Int reprintedInImportedModule() noexcept SWIFT_WARN_UNUSED_RESULT {

0 commit comments

Comments
 (0)