blob: f8e668c144788e5e60d67505a0f525e92066739b [file] [log] [blame]
// RUN: %target-swift-frontend %s -emit-silgen | %FileCheck %s
import Swift
// CHECK-LABEL: sil [ossa] @alloc_dealloc : $@convention(thin) (Int) -> () {
sil [ossa] @alloc_dealloc : $@convention(thin) (Int) -> () {
entry(%x : $Int):
// CHECK: [[B:%.*]] = alloc_box $<τ_0_0> { var τ_0_0 } <Int>
%b = alloc_box $_0_0> { var τ_0_0 } <Int>
// CHECK: [[PB:%.*]] = project_box [[B]] : $<τ_0_0> { var τ_0_0 } <Int>, 0
%ba = project_box %b : $_0_0> { var τ_0_0 } <Int>, 0
// CHECK: store [[X:%.*]] to [trivial] [[PB]] : $*Int
store %x to [trivial] %ba : $*Int
// CHECK: dealloc_box [[B]] : $<τ_0_0> { var τ_0_0 } <Int>
dealloc_box %b : $_0_0> { var τ_0_0 } <Int>
return undef : $()
}