File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change 1
1
// RUN: %empty-directory(%t)
2
2
// RUN: split-file %s %t
3
- // RUN: %target-swift-frontend -emit-ir %t/extern_c.swift -I%t | %FileCheck %s --check-prefixes CHECK,%target-cpu
3
+ // RUN: %target-swift-frontend -emit-ir %t/extern_c.swift -I%t | %FileCheck %s
4
4
5
5
//--- c_abi_types.h
6
6
#include < stdbool. h>
@@ -99,12 +99,8 @@ func test() {
99
99
100
100
// assume %struct.c_struct and %TSo8c_structV have compatible layout
101
101
//
102
- // x86_64: call void @c_roundtrip_c_struct(ptr noalias nocapture sret(%struct.c_struct) {{.*}}, ptr byval(%struct.c_struct) align 8 {{.*}})
103
- // x86_64: call void @swift_roundtrip_c_struct(ptr noalias nocapture sret(%TSo8c_structV) {{.*}}, ptr byval(%TSo8c_structV) align 8 {{.*}})
104
- // arm64: call void @c_roundtrip_c_struct(ptr noalias nocapture sret(%struct.c_struct) {{.*}}, ptr {{.*}})
105
- // arm64: call void @swift_roundtrip_c_struct(ptr noalias nocapture sret(%TSo8c_structV) {{.*}}, ptr {{.*}})
106
- // wasm32: call void @c_roundtrip_c_struct(ptr noalias nocapture sret(%struct.c_struct) {{.*}}, ptr byval(%struct.c_struct) align 4 {{.*}})
107
- // wasm32: call void @swift_roundtrip_c_struct(ptr noalias nocapture sret(%TSo8c_structV) {{.*}}, ptr byval(%TSo8c_structV) align 4 {{.*}})
102
+ // CHECK: call void @c_roundtrip_c_struct(ptr noalias nocapture sret(%struct.c_struct) {{.*}}, ptr{{( byval\(%struct.c_struct\))?}}[[ALIGN:(align [0-9]+)?]] {{.*}})
103
+ // CHECK: call void @swift_roundtrip_c_struct(ptr noalias nocapture sret(%TSo8c_structV) {{.*}}, ptr{{( byval\(%TSo8c_structV\))?}}[[ALIGN]] {{.*}})
108
104
var c_struct_val = c_struct ( foo: 496 , bar: 28 , baz: 8 )
109
105
_ = c_roundtrip_c_struct ( c_struct_val)
110
106
_ = swift_roundtrip_c_struct ( c_struct_val)
You can’t perform that action at this time.
0 commit comments