forked from swiftlang/swift
- Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextern_attr.swift
16 lines (12 loc) · 870 Bytes
/
extern_attr.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %empty-directory(%t)
// RUN: %target-swift-emit-module-interface(%t/Library.swiftinterface) %s -enable-experimental-feature Extern -module-name Library
// RUN: %target-swift-typecheck-module-from-interface(%t/Library.swiftinterface) -enable-experimental-feature Extern -module-name Library
// RUN: %target-swift-typecheck-module-from-interface(%t/Library.swiftinterface) -module-name Library
// RUN: %FileCheck %s < %t/Library.swiftinterface
// REQUIRES: swift_feature_Extern
// CHECK: @_extern(c) public func externalCFunc()
@_extern(c)publicfunc externalCFunc()
// CHECK: @_extern(c, "renamedCFunc") public func externalRenamedCFunc()
@_extern(c,"renamedCFunc")publicfunc externalRenamedCFunc()
// CHECK: @_extern(wasm, module: "m", name: "f") public func wasmImportedFunc()
@_extern(wasm, module:"m", name:"f")publicfunc wasmImportedFunc()