You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We did this for @in => @owned for all parameters before enabling +0. We decided
to defer this work to after +0 was turned back on.
This also fixes the array_contentof_opt test without making append(contentOf: )
take the container at +1.
rdar://38152291
// CHECK-LABEL: sil shared [noinline] @$S37specialize_unconditional_checked_cast011ArchetypeToE0{{[_0-9a-zA-Z]*}}FAA8NotUInt8V_AA1CCTg5 : $@convention(thin) (NotUInt8, @in_guaranteed C) -> @owned C {
49
+
// CHECK-LABEL: sil shared [noinline] @$S37specialize_unconditional_checked_cast011ArchetypeToE0{{[_0-9a-zA-Z]*}}FAA8NotUInt8V_AA1CCTg5 : $@convention(thin) (NotUInt8, @guaranteed C) -> @owned C {
// CHECK-LABEL: sil shared [noinline] @$S37specialize_unconditional_checked_cast27ArchetypeToConcreteConvertC{{[_0-9a-zA-Z]*}}Tg5 : $@convention(thin) (@in_guaranteed C) -> @owned C {
121
-
// CHECK: bb0
122
-
// CHECK-NEXT: debug_value_addr %0
123
-
// CHECK-NEXT: %2 = load %0 : $*C
124
-
// CHECK: return %2
120
+
// CHECK-LABEL: sil shared [noinline] @$S37specialize_unconditional_checked_cast27ArchetypeToConcreteConvertC{{[_0-9a-zA-Z]*}}Tg5 : $@convention(thin) (@guaranteed C) -> @owned C {
121
+
// CHECK: bb0([[ARG:%.*]] : $C)
122
+
// CHECK-NEXT: debug_value [[ARG]]
123
+
// CHECK-NEXT: debug_value [[ARG]]
124
+
// CHECK-NEXT: strong_retain [[ARG]]
125
+
// CHECK-NEXT: return [[ARG]]
125
126
126
127
// x -> y where x is a class but y is not.
127
128
// CHECK-LABEL: sil shared [noinline] @$S37specialize_unconditional_checked_cast27ArchetypeToConcreteConvertC{{[_0-9a-zA-Z]*}}FAA8NotUInt8V_Tg5
// x -> y where x,y are classes and x is a super class of y.
134
-
// CHECK-LABEL: sil shared [noinline] @$S37specialize_unconditional_checked_cast27ArchetypeToConcreteConvertC{{[_0-9a-zA-Z]*}}FAA1DC_Tg5 : $@convention(thin) (@in_guaranteed D) -> @owned C {
135
-
// CHECK: bb0
136
-
// CHECK-NEXT: debug_value_addr %0
137
-
// CHECK-NEXT: %2 = load %0 : $*D
138
-
// CHECK: [[UC:%[0-9]+]] = upcast %2
139
-
// CHECK: return [[UC]]
135
+
// CHECK-LABEL: sil shared [noinline] @$S37specialize_unconditional_checked_cast27ArchetypeToConcreteConvertC{{[_0-9a-zA-Z]*}}FAA1DC_Tg5 : $@convention(thin) (@guaranteed D) -> @owned C {
136
+
// CHECK: bb0([[ARG:%.*]] : $D):
137
+
// CHECK: [[UPCAST:%.*]] = upcast [[ARG]] : $D to $C
138
+
// CHECK: strong_retain [[ARG]]
139
+
// CHECK: return [[UPCAST]]
140
+
// CHECK: } // end sil function '$S37specialize_unconditional_checked_cast27ArchetypeToConcreteConvertC{{[_0-9a-zA-Z]*}}FAA1DC_Tg5'
140
141
141
142
// x -> y where x,y are classes, but x is unrelated to y.
142
143
// CHECK-LABEL: sil shared [noinline] @$S37specialize_unconditional_checked_cast27ArchetypeToConcreteConvertC{{[_0-9a-zA-Z]*}}FAA1EC_Tg5
@@ -163,8 +164,8 @@ public func ArchetypeToConcreteConvertD<T>(t t: T) -> D {
163
164
ArchetypeToConcreteConvertD(t: c)
164
165
165
166
// x -> y where x,y are classes and x is a sub class of y.
166
-
// CHECK-LABEL: sil shared [noinline] @$S37specialize_unconditional_checked_cast27ArchetypeToConcreteConvertD{{[_0-9a-zA-Z]*}}FAA1CC_Tg5 : $@convention(thin) (@in_guaranteed C) -> @owned D {
167
-
// CHECK: bb0(%0 : $*C):
167
+
// CHECK-LABEL: sil shared [noinline] @$S37specialize_unconditional_checked_cast27ArchetypeToConcreteConvertD{{[_0-9a-zA-Z]*}}FAA1CC_Tg5 : $@convention(thin) (@guaranteed C) -> @owned D {
// x -> y where x is not a class but y is a class.
213
-
// CHECK-LABEL: sil shared [noinline] @$S37specialize_unconditional_checked_cast31ConcreteToArchetypeConvertUInt8{{[_0-9a-zA-Z]*}}FAA1CC_Tg5 : $@convention(thin) (NotUInt8, @in_guaranteed C) -> @owned C {
214
+
// CHECK-LABEL: sil shared [noinline] @$S37specialize_unconditional_checked_cast31ConcreteToArchetypeConvertUInt8{{[_0-9a-zA-Z]*}}FAA1CC_Tg5 : $@convention(thin) (NotUInt8, @guaranteed C) -> @owned C {
0 commit comments