mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[sil] Add basic SIL support for alloc_stack [non_nested].
This means I just added the flag and added support for cloning/printing/serializing the bit on alloc_stack.
This commit is contained in:
@@ -494,3 +494,14 @@ bb0(%0 : @guaranteed $Klass):
|
||||
%9999 = tuple ()
|
||||
return %9999 : $()
|
||||
}
|
||||
|
||||
// CHECK-LABEL: sil [ossa] @alloc_stack_nonnested : $@convention(thin) () -> () {
|
||||
// CHECK: alloc_stack [non_nested] $Klass
|
||||
// CHECK: } // end sil function 'alloc_stack_nonnested'
|
||||
sil [ossa] @alloc_stack_nonnested : $@convention(thin) () -> () {
|
||||
bb0:
|
||||
%0 = alloc_stack [non_nested] $Klass
|
||||
dealloc_stack %0
|
||||
%9999 = tuple ()
|
||||
return %9999 : $()
|
||||
}
|
||||
@@ -13,6 +13,17 @@ class Klass {}
|
||||
sil @getC : $@convention(thin) () -> (@owned C)
|
||||
sil @getKlass : $@convention(thin) () -> (@owned Klass)
|
||||
|
||||
// CHECK-LABEL: sil [ossa] @alloc_stack_nonnested : $@convention(thin) () -> () {
|
||||
// CHECK: alloc_stack [non_nested] $Klass
|
||||
// CHECK: } // end sil function 'alloc_stack_nonnested'
|
||||
sil [ossa] @alloc_stack_nonnested : $@convention(thin) () -> () {
|
||||
bb0:
|
||||
%0 = alloc_stack [non_nested] $Klass
|
||||
dealloc_stack %0
|
||||
%9999 = tuple ()
|
||||
return %9999 : $()
|
||||
}
|
||||
|
||||
// CHECK-LABEL: sil [ossa] @ignored_use_test : $@convention(thin) (@guaranteed Klass) -> () {
|
||||
// CHECK: ignored_use %0 : $Klass
|
||||
// CHECK: } // end sil function 'ignored_use_test'
|
||||
|
||||
Reference in New Issue
Block a user