mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Both the syntax and relative order of the LLVM `nocapture` parameter attribute changed upstream in 29441e4f5fa5f5c7709f7cf180815ba97f611297. To reduce conflicts with rebranch, adjust FileCheck patterns to expect both syntaxes and orders anywhere the presence of the attribute is not critical to the test. These changes are temporary and will be cleaned up once rebranch is merged into main.
32 lines
1.6 KiB
Plaintext
32 lines
1.6 KiB
Plaintext
// RUN: %swift -target x86_64-apple-macosx10.9 -module-name main %s -emit-ir -o - | %FileCheck -check-prefix=CHECK-64 %s
|
|
// RUN: %swift -target i386-apple-ios7.1 %s -module-name main -emit-ir -o - | %FileCheck -check-prefix=CHECK-32 %s
|
|
// RUN: %swift -target x86_64-apple-ios7.1 %s -module-name main -emit-ir -o - | %FileCheck -check-prefix=CHECK-64 %s
|
|
// RUN: %swift -target armv7-apple-ios7.1 %s -module-name main -emit-ir -o - | %FileCheck -check-prefix=CHECK-32 %s
|
|
// RUN: %swift -target arm64-apple-ios7.1 %s -module-name main -emit-ir -o - | %FileCheck -check-prefix=CHECK-64 %s
|
|
// RUN: %swift -target x86_64-unknown-linux-gnu -disable-objc-interop %s -module-name main -emit-ir -o - | %FileCheck -check-prefix=CHECK-64 %s
|
|
|
|
// REQUIRES: CODEGENERATOR=X86
|
|
// REQUIRES: CODEGENERATOR=ARM
|
|
|
|
// FIXME(https://github.com/apple/swift/issues/46187): test is failing after being unintentionally disabled for a while.
|
|
// XFAIL: *
|
|
|
|
sil_stage canonical
|
|
|
|
import Builtin
|
|
|
|
// CHECK-32-LABEL: define{{( protected)?}} void @empty_array(%swift.opaque* noalias {{(nocapture|captures\(none\))}}) {{.*}} {
|
|
// CHECK-32: %1 = bitcast %swift.opaque* %0 to i8*
|
|
// CHECK-32: %2 = getelementptr inbounds i8, i8* %1, i32 0
|
|
|
|
// CHECK-64-LABEL: define{{( protected)?}} void @empty_array(%swift.opaque* noalias {{(nocapture|captures\(none\))}}) {{.*}} {
|
|
// CHECK-64: %1 = bitcast %swift.opaque* %0 to i8*
|
|
// CHECK-64: %2 = getelementptr inbounds i8, i8* %1, i64 0
|
|
|
|
sil @empty_array : $@convention(thin) (@in ()) -> () {
|
|
entry(%0 : $*()):
|
|
%1 = integer_literal $Builtin.Word, 1
|
|
%2 = index_addr %0 : $*(), %1 : $Builtin.Word
|
|
return undef : $()
|
|
}
|