@@ -6,74 +6,74 @@ import Builtin
6
6
import Swift
7
7
8
8
class C {
9
- var i = 0
9
+ var i: Builtin.Int64
10
+ init(i: Builtin.Int64) { self.i = i }
10
11
}
11
12
12
- sil [transparent] @calleeWithGuaranteed : $@convention(thin) (@guaranteed C) -> Int {
13
+ sil [transparent] @calleeWithGuaranteed : $@convention(thin) (@guaranteed C) -> Builtin.Int64 {
13
14
bb(%0 : @guaranteed $C):
14
15
%1 = ref_element_addr %0 : $C, #C.i
15
- %2 = load [trivial] %1 : $*Int
16
- return %2 : $Int
16
+ %2 = load [trivial] %1 : $*Builtin.Int64
17
+ return %2 : $Builtin.Int64
17
18
}
18
19
19
- // CHECK-LABEL: sil @callerWithOwned : $@convention(thin) (@owned C) -> Int {
20
+ // CHECK-LABEL: sil @callerWithOwned : $@convention(thin) (@owned C) -> Builtin.Int64 {
20
21
// CHECK: bb0(%0 : @owned $C):
21
22
// CHECK: [[BORROW:%.*]] = begin_borrow %0 : $C
22
23
// CHECK: [[ADDR:%.*]] = ref_element_addr [[BORROW]] : $C, #C.i
23
- // CHECK: [[VAL:%.*]] = load [trivial] [[ADDR]] : $*Int
24
+ // CHECK: [[VAL:%.*]] = load [trivial] [[ADDR]] : $*Builtin.Int64
24
25
// CHECK: end_borrow [[BORROW]] from %0 : $C, $C
25
26
// CHECK: destroy_value %0 : $C
26
- // CHECK: return [[VAL]] : $Int
27
+ // CHECK: return [[VAL]] : $Builtin.Int64
27
28
// CHECK-LABEL: } // end sil function 'callerWithOwned'
28
- sil @callerWithOwned : $@convention(thin) (@owned C) -> Int {
29
+ sil @callerWithOwned : $@convention(thin) (@owned C) -> Builtin.Int64 {
29
30
bb(%0 : @owned $C):
30
- %fn = function_ref @calleeWithGuaranteed : $@convention(thin) (@guaranteed C) -> Int
31
- %call = apply %fn(%0) : $@convention(thin) (@guaranteed C) -> Int
31
+ %fn = function_ref @calleeWithGuaranteed : $@convention(thin) (@guaranteed C) -> Builtin.Int64
32
+ %call = apply %fn(%0) : $@convention(thin) (@guaranteed C) -> Builtin.Int64
32
33
destroy_value %0 : $C
33
- return %call : $Int
34
+ return %call : $Builtin.Int64
34
35
}
35
36
36
37
struct MyError : Error {}
37
38
38
- sil [transparent] @calleeWithGuaranteedThrows : $@convention(thin) (@guaranteed C) -> (Int , @error Error) {
39
+ sil [transparent] @calleeWithGuaranteedThrows : $@convention(thin) (@guaranteed C) -> (Builtin.Int64 , @error Error) {
39
40
bb(%0 : @guaranteed $C):
40
41
%1 = ref_element_addr %0 : $C, #C.i
41
- %2 = load [trivial] %1 : $*Int
42
+ %2 = load [trivial] %1 : $*Builtin.Int64
42
43
%3 = integer_literal $Builtin.Int64, 0
43
- %4 = struct_extract %2 : $Int, #Int._value
44
- %5 = builtin "cmp_eq_Int64"(%3 : $Builtin.Int64, %4 : $Builtin.Int64) : $Builtin.Int1
44
+ %5 = builtin "cmp_eq_Int64"(%2 : $Builtin.Int64, %3 : $Builtin.Int64) : $Builtin.Int1
45
45
cond_br %5, bb1, bb2
46
46
47
47
bb1:
48
48
%6 = alloc_existential_box $Error, $MyError
49
49
throw %6 : $Error
50
50
51
51
bb2:
52
- return %2 : $Int
52
+ return %2 : $Builtin.Int64
53
53
}
54
54
55
- // CHECK-LABEL: sil @callerWithThrow : $@convention(thin) (@owned C) -> (Int , @error Error) {
55
+ // CHECK-LABEL: sil @callerWithThrow : $@convention(thin) (@owned C) -> (Builtin.Int64 , @error Error) {
56
56
// CHECK: bb0(%0 : @owned $C):
57
57
// CHECK: [[BORROW:%.*]] = begin_borrow %0 : $C
58
58
// CHECK: [[ADDR:%.*]] = ref_element_addr [[BORROW]] : $C, #C.i
59
- // CHECK: [[VAL:%.*]] = load [trivial] [[ADDR]] : $*Int
60
- // CHECK: bb{{.*}}([[RET:%.*]] : @trivial $Int ):
59
+ // CHECK: [[VAL:%.*]] = load [trivial] [[ADDR]] : $*Builtin.Int64
60
+ // CHECK: bb{{.*}}([[RET:%.*]] : @trivial $Builtin.Int64 ):
61
61
// CHECK: end_borrow [[BORROW]] from %0 : $C, $C
62
62
// CHECK: destroy_value %0 : $C
63
- // CHECK: return [[RET]] : $Int
63
+ // CHECK: return [[RET]] : $Builtin.Int64
64
64
// CHECK: bb{{.*}}([[ERR:%.*]] : @owned $Error):
65
65
// CHECK: end_borrow [[BORROW]] from %0 : $C, $C
66
66
// CHECK: destroy_value %0 : $C
67
67
// CHECK: throw [[ERR]] : $Error
68
68
// CHECK-LABEL: } // end sil function 'callerWithThrow'
69
- sil @callerWithThrow : $@convention(thin) (@owned C) -> (Int , @error Error) {
69
+ sil @callerWithThrow : $@convention(thin) (@owned C) -> (Builtin.Int64 , @error Error) {
70
70
bb(%0 : @owned $C):
71
- %fn = function_ref @calleeWithGuaranteedThrows : $@convention(thin) (@guaranteed C) -> (Int , @error Error)
72
- try_apply %fn(%0) : $@convention(thin) (@guaranteed C) -> (Int , @error Error), normal bb1, error bb2
71
+ %fn = function_ref @calleeWithGuaranteedThrows : $@convention(thin) (@guaranteed C) -> (Builtin.Int64 , @error Error)
72
+ try_apply %fn(%0) : $@convention(thin) (@guaranteed C) -> (Builtin.Int64 , @error Error), normal bb1, error bb2
73
73
74
- bb1(%4 : @trivial $Int ):
74
+ bb1(%4 : @trivial $Builtin.Int64 ):
75
75
destroy_value %0 : $C
76
- return %4 : $Int
76
+ return %4 : $Builtin.Int64
77
77
78
78
bb2(%5 : @owned $Error):
79
79
destroy_value %0 : $C
0 commit comments