mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
27 lines
658 B
Plaintext
27 lines
658 B
Plaintext
// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s | %FileCheck %s
|
|
|
|
import Swift
|
|
|
|
// CHECK: @sil_stored var orgx
|
|
class Rect {
|
|
@sil_stored var orgx: Double { get }
|
|
init(orgx: Double)
|
|
}
|
|
|
|
// CHECK_LABEL: sil @_TFC4rect4Rectg4orgxSd
|
|
sil @_TFC4rect4Rectg4orgxSd : $@convention(method) (@guaranteed Rect) -> Double {
|
|
bb0(%0 : $Rect):
|
|
debug_value %0 : $Rect
|
|
// CHECK: ref_element_addr
|
|
%2 = ref_element_addr %0 : $Rect, #Rect.orgx
|
|
%3 = load %2 : $*Double
|
|
strong_release %0 : $Rect
|
|
return %3 : $Double
|
|
}
|
|
|
|
// CHECK_LABEL: sil_vtable Rect
|
|
sil_vtable Rect {
|
|
// CHECK: #Rect.orgx!getter
|
|
#Rect.orgx!getter.1: _TFC4rect4Rectg4orgxSd
|
|
}
|