mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
27 lines
450 B
Swift
27 lines
450 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: split-file %s %t
|
|
// RUN: %target-swift-frontend -I%t %t/caller.swift -emit-ir | %FileCheck %s
|
|
|
|
//--- c_funcs.h
|
|
|
|
__attribute__((swiftcall))
|
|
extern void with_swiftcc(void);
|
|
|
|
//--- module.modulemap
|
|
|
|
module c_funcs {
|
|
header "c_funcs.h"
|
|
}
|
|
|
|
//--- caller.swift
|
|
|
|
import c_funcs
|
|
|
|
func test() {
|
|
// CHECK: call swiftcc void @with_swiftcc()
|
|
with_swiftcc()
|
|
}
|
|
// CHECK: declare {{.*}}swiftcc void @with_swiftcc()
|
|
|
|
test()
|