Skip to content

Commit 77c6494

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

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

test/embedded/cxx-no-metadata.swift

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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_in_compiler
7+
// REQUIRES: OS=macosx || OS=linux-gnu
8+
// REQUIRES: swift_feature_Embedded
9+
10+
// BEGIN header.h
11+
12+
// C++
13+
struct CxxStruct {
14+
int field;
15+
};
16+
17+
// BEGIN module.modulemap
18+
19+
module MyModule {
20+
header "header.h"
21+
}
22+
23+
// BEGIN Main.swift
24+
25+
import MyModule
26+
27+
public func foo(ptr: UnsafeMutablePointer<CxxStruct>?) {
28+
}
29+
30+
foo(ptr: nil)

0 commit comments

Comments
 (0)