mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
53 lines
2.2 KiB
Plaintext
53 lines
2.2 KiB
Plaintext
// RUN: %target-sil-opt -enable-objc-interop -enable-lexical-lifetimes=true -enable-sil-verify-all=true %s | %target-sil-opt -enable-objc-interop -enable-lexical-lifetimes=true -enable-sil-verify-all=true | %FileCheck %s
|
|
|
|
sil_stage canonical
|
|
|
|
class C {}
|
|
|
|
// CHECK-LABEL: sil [ossa] @one_arg_eager_move : {{.*}} {
|
|
// CHECK: {{bb[0-9]+}}({{%[^,]+}} : @_eagerMove @owned $C):
|
|
// CHECK-LABEL: } // end sil function 'one_arg_eager_move'
|
|
sil [ossa] @one_arg_eager_move : $@convention(thin) (@owned C) -> () {
|
|
bb0(%instance : @_eagerMove @owned $C):
|
|
destroy_value %instance : $C
|
|
%retval = tuple()
|
|
return %retval : $()
|
|
}
|
|
|
|
// CHECK-LABEL: sil [ossa] @one_arg_eager_move_and_consumable_and_assignable : {{.*}} {
|
|
// CHECK: {{bb[0-9]+}}({{%[^,]+}} : @noImplicitCopy @_eagerMove @owned $C):
|
|
// CHECK-LABEL: } // end sil function 'one_arg_eager_move_and_consumable_and_assignable'
|
|
sil [ossa] @one_arg_eager_move_and_consumable_and_assignable : $(@owned C) -> () {
|
|
bb0(%instance : @noImplicitCopy @_eagerMove @owned $C):
|
|
destroy_value %instance : $C
|
|
%retval = tuple()
|
|
return %retval : $()
|
|
}
|
|
|
|
// CHECK-LABEL: sil [ossa] @one_arg_lexical : {{.*}} {
|
|
// CHECK: {{bb[0-9]+}}({{%[^,]+}} : @_lexical @owned $C):
|
|
// CHECK-LABEL: } // end sil function 'one_arg_lexical'
|
|
sil [ossa] @one_arg_lexical : $@convention(thin) (@owned C) -> () {
|
|
bb0(%instance : @_lexical @owned $C):
|
|
destroy_value %instance : $C
|
|
%retval = tuple()
|
|
return %retval : $()
|
|
}
|
|
|
|
// CHECK-LABEL: sil [ossa] @one_arg_lexical_and_consumable_and_assignable : {{.*}} {
|
|
// CHECK: {{bb[0-9]+}}({{%[^,]+}} : @noImplicitCopy @_lexical @owned $C):
|
|
// CHECK-LABEL: } // end sil function 'one_arg_lexical_and_consumable_and_assignable'
|
|
sil [ossa] @one_arg_lexical_and_consumable_and_assignable : $@convention(thin) (@owned C) -> () {
|
|
bb0(%instance : @noImplicitCopy @_lexical @owned $C):
|
|
destroy_value %instance : $C
|
|
%retval = tuple()
|
|
return %retval : $()
|
|
}
|
|
|
|
// CHECK-LABEL: sil [lexical_lifetimes] [ossa] @force_lexical_function : {{.*}} {
|
|
// CHECK-LABEL: } // end sil function 'force_lexical_function'
|
|
sil [lexical_lifetimes] [ossa] @force_lexical_function : $@convention(thin) () -> () {
|
|
%retval = tuple()
|
|
return %retval : $()
|
|
}
|