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.
20 lines
876 B
Plaintext
20 lines
876 B
Plaintext
// RUN: %target-swift-frontend -emit-ir %s -module-name Test | %FileCheck %s
|
|
|
|
import Builtin
|
|
|
|
struct X {
|
|
init()
|
|
var x : Builtin.Int32
|
|
}
|
|
|
|
// Make sure we can irgen a SIL function with various parameter attributes
|
|
// without choking. This is just a basic reality check.
|
|
|
|
// CHECK: define{{( dllexport)?}}{{( protected)?}} swiftcc void @foo(ptr noalias{{( nocapture)?}} sret({{.*}}){{( captures\(none\))?}} %0, ptr noalias {{(nocapture|captures\(none\))}} dereferenceable({{.*}}) %1, ptr {{(nocapture|captures\(none\))}} dereferenceable({{.*}}) %2, ptr noalias {{(nocapture|captures\(none\))}} dereferenceable({{.*}}) %3, i32 %4, i32 %5, i32 %6) {{.*}} {
|
|
|
|
sil @foo : $@convention(thin) (@in X, @inout X, @in_guaranteed X, @owned X, X, @guaranteed X) -> @out X {
|
|
bb0(%0 : $*X, %1 : $*X, %2 : $*X, %3 : $*X, %4 : $X, %5 : $X, %6 : $X):
|
|
%9999 = tuple()
|
|
return %9999 : $()
|
|
}
|