Skip to content

Commit 9b85a0a

Browse files
committed
[embedded] Add test/embedded/cxx-no-metadata.swift testcase
1 parent af6b24b commit 9b85a0a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

test/embedded/cxx-no-metadata.swift

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %{python} %utils/split_file.py -o %t %s
3+
4+
// RUN: %target-swift-frontend -I %t %t/Main.swift -enable-experimental-feature Embedded -cxx-interoperability-mode=default -c -o %t/a.o -Rmodule-loading
5+
6+
// REQUIRES: swift_feature_Embedded
7+
8+
// BEGIN header.h
9+
10+
// C++
11+
struct CxxStruct {
12+
int field;
13+
};
14+
15+
// BEGIN module.modulemap
16+
17+
module MyModule {
18+
header "header.h"
19+
}
20+
21+
// BEGIN Main.swift
22+
23+
import MyModule
24+
25+
public func foo(ptr: UnsafeMutablePointer<CxxStruct>?) {
26+
}
27+
28+
foo(ptr: nil)

0 commit comments

Comments
 (0)