Skip to content

Commit e901fda

Browse files
committed
IRGen: Fix test case only on x86-64 do we use indirect byval passing
1 parent c15c671 commit e901fda

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

test/IRGen/c_functions.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -import-objc-header %S/Inputs/c_functions.h -primary-file %s -emit-ir | %FileCheck %s
3+
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -target x86_64-apple-macosx10.11 -import-objc-header %S/Inputs/c_functions.h -primary-file %s -emit-ir | %FileCheck %s --check-prefix=x86_64
34

45
// This is deliberately not a SIL test so that we can test SILGen too.
56

@@ -18,8 +19,8 @@ func test_indirect_by_val_alignment() {
1819
log_a_thing(x)
1920
}
2021

21-
// CHECK-LABEL: define hidden swiftcc void @_T011c_functions30test_indirect_by_val_alignmentyyF()
22-
// CHECK: %indirect-temporary = alloca %TSC7a_thingV, align [[ALIGN:[0-9]+]]
23-
// CHECK: [[CAST:%.*]] = bitcast %TSC7a_thingV* %indirect-temporary to %struct.a_thing*
24-
// CHECK: call void @log_a_thing(%struct.a_thing* byval align [[ALIGN]] [[CAST]])
25-
// CHECK: define internal void @log_a_thing(%struct.a_thing* byval align [[ALIGN]]
22+
// x86_64-LABEL: define hidden swiftcc void @_T011c_functions30test_indirect_by_val_alignmentyyF()
23+
// x86_64: %indirect-temporary = alloca %TSC7a_thingV, align [[ALIGN:[0-9]+]]
24+
// x86_64: [[CAST:%.*]] = bitcast %TSC7a_thingV* %indirect-temporary to %struct.a_thing*
25+
// x86_64: call void @log_a_thing(%struct.a_thing* byval align [[ALIGN]] [[CAST]])
26+
// x86_64: define internal void @log_a_thing(%struct.a_thing* byval align [[ALIGN]]

0 commit comments

Comments
 (0)