Skip to content

Commit 40a09c9

Browse files
committed
Fixup tests for -assume-parsing-unqualified-ownership-sil => [ossa] transition.
1 parent 6229938 commit 40a09c9

File tree

421 files changed

+3728
-3728
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

421 files changed

+3728
-3728
lines changed

test/APINotes/versioned.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,14 @@ func testRenamedOptionyEnum() {
251251
#if !swift(>=5)
252252

253253
func useSwift4Name(_: ImportantCStruct) {}
254-
// CHECK-SILGEN-4: sil hidden @$s9versioned13useSwift4NameyySo11SomeCStructVF
254+
// CHECK-SILGEN-4: sil hidden [ossa] @$s9versioned13useSwift4NameyySo11SomeCStructVF
255255

256256
func useNewlyNested(_: InnerInSwift5) {}
257-
// CHECK-SILGEN-4: sil hidden @$s9versioned14useNewlyNestedyySo13InnerInSwift5VF
257+
// CHECK-SILGEN-4: sil hidden [ossa] @$s9versioned14useNewlyNestedyySo13InnerInSwift5VF
258258
#endif
259259

260260
func useSwift5Name(_: VeryImportantCStruct) {}
261-
// CHECK-SILGEN: sil hidden @$s9versioned13useSwift5NameyySo11SomeCStructVF
261+
// CHECK-SILGEN: sil hidden [ossa] @$s9versioned13useSwift5NameyySo11SomeCStructVF
262262

263263

264264

test/ClangImporter/nullability_silgen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import nullability
99
import Foundation
1010

1111
// null_resettable properties.
12-
// CHECK-LABEL: sil hidden @$s18nullability_silgen18testNullResettable{{[_0-9a-zA-Z]*}}F
12+
// CHECK-LABEL: sil hidden [ossa] @$s18nullability_silgen18testNullResettable{{[_0-9a-zA-Z]*}}F
1313
func testNullResettable(_ sc: SomeClass) {
1414
sc.defaultedProperty = nil
1515
sc.defaultedProperty = "hello"

test/ClangImporter/optional.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class A {
1212
@objc func foo() -> String? {
1313
return ""
1414
}
15-
// CHECK-LABEL: sil hidden [thunk] @$s8optional1AC3fooSSSgyFTo : $@convention(objc_method) (A) -> @autoreleased Optional<NSString>
15+
// CHECK-LABEL: sil hidden [thunk] [ossa] @$s8optional1AC3fooSSSgyFTo : $@convention(objc_method) (A) -> @autoreleased Optional<NSString>
1616
// CHECK: bb0([[SELF:%.*]] : @unowned $A):
1717
// CHECK: [[SELF_COPY:%.*]] = copy_value [[SELF]]
1818
// CHECK: [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
@@ -41,7 +41,7 @@ class A {
4141
// CHECK-NEXT: return [[T0]]
4242

4343
@objc func bar(x x : String?) {}
44-
// CHECK-LABEL: sil hidden [thunk] @$s8optional1AC3bar1xySSSg_tFTo : $@convention(objc_method) (Optional<NSString>, A) -> ()
44+
// CHECK-LABEL: sil hidden [thunk] [ossa] @$s8optional1AC3bar1xySSSg_tFTo : $@convention(objc_method) (Optional<NSString>, A) -> ()
4545
// CHECK: bb0([[ARG:%.*]] : @unowned $Optional<NSString>, [[SELF:%.*]] : @unowned $A):
4646
// CHECK: [[ARG_COPY:%.*]] = copy_value [[ARG]]
4747
// CHECK: [[SELF_COPY:%.*]] = copy_value [[SELF]]

test/Constraints/ranking.swift

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func genericOverload<T>(_: T?) {}
3030
func genericOptional<T>(_: T?) {}
3131
func genericNoOptional<T>(_: T) {}
3232

33-
// CHECK-LABEL: sil hidden @$s7ranking22propertyVersusFunctionyyAA1P_p_xtAaCRzlF
33+
// CHECK-LABEL: sil hidden [ossa] @$s7ranking22propertyVersusFunctionyyAA1P_p_xtAaCRzlF
3434
func propertyVersusFunction<T : P>(_ p: P, _ t: T) {
3535
// CHECK: witness_method $@opened("{{.*}}") P, #P.p!getter.1
3636
let _ = p.p
@@ -149,7 +149,7 @@ func f1(_ a: A) -> A { return a }
149149
func f1(_ b: B) -> B { return b }
150150

151151
func testDerived(b: B) {
152-
// CHECK-LABEL: sil hidden @$s7ranking11testDerived1byAA1BC_tF
152+
// CHECK-LABEL: sil hidden [ossa] @$s7ranking11testDerived1byAA1BC_tF
153153
// CHECK: function_ref @$s7ranking2f1yAA1BCADF
154154
// CHECK: function_ref @$s7ranking2f0yyxlF
155155
f0(f1(b))
@@ -191,47 +191,47 @@ extension GenericClass {
191191

192192
// Make sure we favour the class implementation over the protocol requirement.
193193

194-
// CHECK-LABEL: sil hidden @$s7ranking32testGenericPropertyProtocolClassyyxAA1YCRbzAA1XRzlF
194+
// CHECK-LABEL: sil hidden [ossa] @$s7ranking32testGenericPropertyProtocolClassyyxAA1YCRbzAA1XRzlF
195195
func testGenericPropertyProtocolClass<T : X & Y>(_ t: T) {
196196
_ = t.foo // CHECK: class_method {{%.*}} : $Y, #Y.foo!getter.1
197197
_ = t.bar // CHECK: function_ref @$s7ranking1YC3barSivg
198198
_ = t.baz() // CHECK: class_method {{%.*}} : $Y, #Y.baz
199199
_ = t[""] // CHECK: class_method {{%.*}} : $Y, #Y.subscript!getter.1
200200
}
201201

202-
// CHECK-LABEL: sil hidden @$s7ranking36testExistentialPropertyProtocolClassyyAA1X_AA1YCXcF
202+
// CHECK-LABEL: sil hidden [ossa] @$s7ranking36testExistentialPropertyProtocolClassyyAA1X_AA1YCXcF
203203
func testExistentialPropertyProtocolClass(_ t: X & Y) {
204204
_ = t.foo // CHECK: class_method {{%.*}} : $Y, #Y.foo!getter.1
205205
_ = t.bar // CHECK: function_ref @$s7ranking1YC3barSivg
206206
_ = t.baz() // CHECK: class_method {{%.*}} : $Y, #Y.baz
207207
_ = t[""] // CHECK: class_method {{%.*}} : $Y, #Y.subscript!getter.1
208208
}
209209

210-
// CHECK-LABEL: sil hidden @$s7ranking46testGenericPropertySubclassConstrainedProtocolyyxAA1ZRzlF
210+
// CHECK-LABEL: sil hidden [ossa] @$s7ranking46testGenericPropertySubclassConstrainedProtocolyyxAA1ZRzlF
211211
func testGenericPropertySubclassConstrainedProtocol<T : Z>(_ t: T) {
212212
_ = t.foo // CHECK: class_method {{%.*}} : $Y, #Y.foo!getter.1
213213
_ = t.bar // CHECK: function_ref @$s7ranking1YC3barSivg
214214
_ = t.baz() // CHECK: class_method {{%.*}} : $Y, #Y.baz
215215
_ = t[""] // CHECK: class_method {{%.*}} : $Y, #Y.subscript!getter.1
216216
}
217217

218-
// CHECK-LABEL: sil hidden @$s7ranking50testExistentialPropertySubclassConstrainedProtocolyyAA1Z_pF
218+
// CHECK-LABEL: sil hidden [ossa] @$s7ranking50testExistentialPropertySubclassConstrainedProtocolyyAA1Z_pF
219219
func testExistentialPropertySubclassConstrainedProtocol(_ t: Z) {
220220
_ = t.foo // CHECK: class_method {{%.*}} : $Y, #Y.foo!getter.1
221221
_ = t.bar // CHECK: function_ref @$s7ranking1YC3barSivg
222222
_ = t.baz() // CHECK: class_method {{%.*}} : $Y, #Y.baz
223223
_ = t[""] // CHECK: class_method {{%.*}} : $Y, #Y.subscript!getter.1
224224
}
225225

226-
// CHECK-LABEL: sil hidden @$s7ranking43testExistentialPropertyProtocolGenericClassyyAA1X_AA0fG0CySiGXcF
226+
// CHECK-LABEL: sil hidden [ossa] @$s7ranking43testExistentialPropertyProtocolGenericClassyyAA1X_AA0fG0CySiGXcF
227227
func testExistentialPropertyProtocolGenericClass(_ t: GenericClass<Int> & X) {
228228
_ = t.foo // CHECK: class_method {{%.*}} : $GenericClass<Int>, #GenericClass.foo!getter.1
229229
_ = t.bar // CHECK: function_ref @$s7ranking12GenericClassC3barxvg
230230
_ = t.baz() // CHECK: class_method {{%.*}} : $GenericClass<Int>, #GenericClass.baz
231231
_ = t[""] // CHECK: function_ref @$s7ranking12GenericClassCySiSScig
232232
}
233233

234-
// CHECK-LABEL: sil hidden @$s7ranking43testExistentialPropertyProtocolGenericClassyyAA1X_AA0fG0CySSGXcF
234+
// CHECK-LABEL: sil hidden [ossa] @$s7ranking43testExistentialPropertyProtocolGenericClassyyAA1X_AA0fG0CySSGXcF
235235
func testExistentialPropertyProtocolGenericClass(_ t: GenericClass<String> & X) {
236236
_ = t.foo // CHECK: class_method {{%.*}} : $GenericClass<String>, #GenericClass.foo!getter.1
237237
_ = t.bar // CHECK: function_ref @$s7ranking12GenericClassC3barxvg
@@ -240,7 +240,7 @@ func testExistentialPropertyProtocolGenericClass(_ t: GenericClass<String> & X)
240240
}
241241

242242
extension X where Self : Y {
243-
// CHECK-LABEL: sil hidden @$s7ranking1XPA2A1YCRbzrlE32testGenericPropertyProtocolClassyyxF
243+
// CHECK-LABEL: sil hidden [ossa] @$s7ranking1XPA2A1YCRbzrlE32testGenericPropertyProtocolClassyyxF
244244
func testGenericPropertyProtocolClass(_ x: Self) {
245245
_ = self.foo // CHECK: class_method {{%.*}} : $Y, #Y.foo!getter.1
246246
_ = self.bar // CHECK: function_ref @$s7ranking1YC3barSivg
@@ -250,7 +250,7 @@ extension X where Self : Y {
250250
}
251251

252252
extension X where Self : GenericClass<Int> {
253-
// CHECK-LABEL: sil hidden @$s7ranking1XPA2A12GenericClassCySiGRbzrlE04testb16PropertyProtocolbC0yyxF
253+
// CHECK-LABEL: sil hidden [ossa] @$s7ranking1XPA2A12GenericClassCySiGRbzrlE04testb16PropertyProtocolbC0yyxF
254254
func testGenericPropertyProtocolGenericClass(_ x: Self) {
255255
_ = self.foo // CHECK: class_method {{%.*}} : $GenericClass<Int>, #GenericClass.foo!getter.1
256256
_ = self.bar // CHECK: function_ref @$s7ranking12GenericClassC3barxvg
@@ -260,7 +260,7 @@ extension X where Self : GenericClass<Int> {
260260
}
261261

262262
extension X where Self : GenericClass<String> {
263-
// CHECK-LABEL: sil hidden @$s7ranking1XPA2A12GenericClassCySSGRbzrlE04testb16PropertyProtocolbC0yyxF
263+
// CHECK-LABEL: sil hidden [ossa] @$s7ranking1XPA2A12GenericClassCySSGRbzrlE04testb16PropertyProtocolbC0yyxF
264264
func testGenericPropertyProtocolGenericClass(_ x: Self) {
265265
_ = self.foo // CHECK: class_method {{%.*}} : $GenericClass<String>, #GenericClass.foo!getter.1
266266
_ = self.bar // CHECK: function_ref @$s7ranking12GenericClassC3barxvg
@@ -274,15 +274,15 @@ extension X where Self : GenericClass<String> {
274274
//--------------------------------------------------------------------
275275

276276
struct UnsafePointerStruct {
277-
// CHECK-LABEL: sil hidden @$s7ranking19UnsafePointerStructVyACSPyxGSgclufC : $@convention(method) <U> (Optional<UnsafePointer<U>>, @thin UnsafePointerStruct.Type) -> UnsafePointerStruct
277+
// CHECK-LABEL: sil hidden [ossa] @$s7ranking19UnsafePointerStructVyACSPyxGSgclufC : $@convention(method) <U> (Optional<UnsafePointer<U>>, @thin UnsafePointerStruct.Type) -> UnsafePointerStruct
278278
init<U>(_ from: UnsafePointer<U>) {}
279279
init<U>(_ from: UnsafePointer<U>?) {
280280
// CHECK: function_ref @$s7ranking19UnsafePointerStructVyACSPyxGclufC : $@convention(method) <τ_0_0> (UnsafePointer<τ_0_0>, @thin UnsafePointerStruct.Type) -> UnsafePointerStruct
281281
self.init(from!)
282282
}
283283
}
284284

285-
// CHECK-LABEL: sil hidden @$s7ranking22useUnsafePointerStructyySPyxGlF : $@convention(thin) <U> (UnsafePointer<U>) -> ()
285+
// CHECK-LABEL: sil hidden [ossa] @$s7ranking22useUnsafePointerStructyySPyxGlF : $@convention(thin) <U> (UnsafePointer<U>) -> ()
286286
func useUnsafePointerStruct<U>(_ ptr: UnsafePointer<U>) {
287287
// CHECK: function_ref @$s7ranking19UnsafePointerStructVyACSPyxGclufC : $@convention(method) <τ_0_0> (UnsafePointer<τ_0_0>, @thin UnsafePointerStruct.Type) -> UnsafePointerStruct
288288
let _: UnsafePointerStruct = UnsafePointerStruct(ptr)

test/DebugInfo/simple.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sil_stage canonical
55
import Builtin
66
import Swift
77

8-
sil @square : $@convention(thin) (Int32) -> Int32 {
8+
sil [ossa] @square : $@convention(thin) (Int32) -> Int32 {
99
bb0(%0 : $Int32):
1010
debug_value %0 : $Int32, let, name "x" // id: %1
1111
%3 = struct_extract %0 : $Int32, #Int32._value // user: %6

test/IRGen/archetype_resilience.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public enum EnumWithClassArchetypeAndDynamicSize<T : AnyObject> {
1919
// CHECK-LABEL: define swiftcc void @copyDynamicMultiEnum(%swift.type* %"EnumWithClassArchetypeAndDynamicSize<T>", %swift.type* %U, %T20archetype_resilience36EnumWithClassArchetypeAndDynamicSizeO* noalias nocapture swiftself)
2020
// CHECK: call %T20archetype_resilience36EnumWithClassArchetypeAndDynamicSizeO* @"$s20archetype_resilience36EnumWithClassArchetypeAndDynamicSizeOyxGRlzCr0_lWOc"(%T20archetype_resilience36EnumWithClassArchetypeAndDynamicSizeO* %0, %T20archetype_resilience36EnumWithClassArchetypeAndDynamicSizeO* {{.*}}, %swift.type* %"EnumWithClassArchetypeAndDynamicSize<T>")
2121
// CHECK: ret void
22-
sil @copyDynamicMultiEnum : $@convention(method) <T, U where T: AnyObject> (@in_guaranteed EnumWithClassArchetypeAndDynamicSize<T>) -> () {
22+
sil [ossa] @copyDynamicMultiEnum : $@convention(method) <T, U where T: AnyObject> (@in_guaranteed EnumWithClassArchetypeAndDynamicSize<T>) -> () {
2323
bb0(%0 : $*EnumWithClassArchetypeAndDynamicSize<T>):
2424
%1 = alloc_stack $EnumWithClassArchetypeAndDynamicSize<T>
2525
copy_addr %0 to [initialization] %1 : $*EnumWithClassArchetypeAndDynamicSize<T>

test/IRGen/autorelease.sil

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import Swift
99

1010
class C {}
1111
sil_vtable C {}
12-
sil @_TFC11autorelease1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
12+
sil [ossa] @_TFC11autorelease1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
1313
bb0(%0 : @owned $C):
1414
%1 = unchecked_ref_cast %0 : $C to $Builtin.NativeObject // user: %2
1515
return %1 : $Builtin.NativeObject // id: %2
1616
}
1717

18-
sil @foo : $@convention(thin) (@owned C?) -> @autoreleased C? {
18+
sil [ossa] @foo : $@convention(thin) (@owned C?) -> @autoreleased C? {
1919
bb0(%0 : @owned $C?):
2020
return %0 : $C?
2121
}
@@ -28,7 +28,7 @@ bb0(%0 : @owned $C?):
2828
// CHECK-64: [[T0:%.*]] = tail call i64 bitcast ([[OBJC]]* ([[OBJC]]*)* @objc_autoreleaseReturnValue to i64 (i64)*)(i64 %0)
2929
// CHECK-64-NEXT: ret i64 [[T0]]
3030

31-
sil @bar : $@convention(thin) (@owned C?) -> @owned C? {
31+
sil [ossa] @bar : $@convention(thin) (@owned C?) -> @owned C? {
3232
bb0(%0 : @owned $C?):
3333
%1 = function_ref @foo : $@convention(thin) (@owned C?) -> @autoreleased C?
3434
%2 = apply %1(%0) : $@convention(thin) (@owned C?) -> @autoreleased C?

test/IRGen/autorelease_optimized_aarch64.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class C {}
1212

1313
sil_vtable C {}
1414

15-
sil @_TFC21autorelease_optimized1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
15+
sil [ossa] @_TFC21autorelease_optimized1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
1616
bb0(%0 : @owned $C):
1717
%1 = unchecked_ref_cast %0 : $C to $Builtin.NativeObject // user: %2
1818
return %1 : $Builtin.NativeObject // id: %2
@@ -21,7 +21,7 @@ bb0(%0 : @owned $C):
2121
sil public_external @foo : $@convention(thin) (@owned C) -> @autoreleased C
2222
sil public_external @bar : $@convention(thin) (@owned C) -> ()
2323

24-
sil @baz : $@convention(thin) (@owned C) -> () {
24+
sil [ossa] @baz : $@convention(thin) (@owned C) -> () {
2525
bb0(%0 : @owned $C):
2626
%1 = function_ref @foo : $@convention(thin) (@owned C) -> @autoreleased C
2727
%2 = apply %1(%0) : $@convention(thin) (@owned C) -> @autoreleased C

test/IRGen/autorelease_optimized_armv7.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class C {}
1212

1313
sil_vtable C {}
1414

15-
sil @_TFC21autorelease_optimized1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
15+
sil [ossa] @_TFC21autorelease_optimized1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
1616
bb0(%0 : @owned $C):
1717
%1 = unchecked_ref_cast %0 : $C to $Builtin.NativeObject // user: %2
1818
return %1 : $Builtin.NativeObject // id: %2
@@ -21,7 +21,7 @@ bb0(%0 : @owned $C):
2121
sil public_external @foo : $@convention(thin) (@owned C) -> @autoreleased C
2222
sil public_external @bar : $@convention(thin) (@owned C) -> ()
2323

24-
sil @baz : $@convention(thin) (@owned C) -> () {
24+
sil [ossa] @baz : $@convention(thin) (@owned C) -> () {
2525
bb0(%0 : @owned $C):
2626
%1 = function_ref @foo : $@convention(thin) (@owned C) -> @autoreleased C
2727
%2 = apply %1(%0) : $@convention(thin) (@owned C) -> @autoreleased C

test/IRGen/autorelease_optimized_x86_64.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class C {}
1212

1313
sil_vtable C {}
1414

15-
sil @_TFC21autorelease_optimized1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
15+
sil [ossa] @_TFC21autorelease_optimized1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
1616
bb0(%0 : @owned $C):
1717
%1 = unchecked_ref_cast %0 : $C to $Builtin.NativeObject // user: %2
1818
return %1 : $Builtin.NativeObject // id: %2
@@ -21,7 +21,7 @@ bb0(%0 : @owned $C):
2121
sil public_external @foo : $@convention(thin) (@owned C) -> @autoreleased C
2222
sil public_external @bar : $@convention(thin) (@owned C) -> ()
2323

24-
sil @baz : $@convention(thin) (@owned C) -> () {
24+
sil [ossa] @baz : $@convention(thin) (@owned C) -> () {
2525
bb0(%0 : @owned $C):
2626
%1 = function_ref @foo : $@convention(thin) (@owned C) -> @autoreleased C
2727
%2 = apply %1(%0) : $@convention(thin) (@owned C) -> @autoreleased C

test/IRGen/builtin_word.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ entry:
3535
// ARM32: %4 = insertvalue { i32, i64 } %3, i64 %2, 1
3636
// ARM32: ret { i32, i64 } %4
3737
// ARM32: }
38-
sil @word_zextOrBitCast : $(Builtin.Int32, Builtin.Word) -> (Builtin.Word, Builtin.Int64) {
38+
sil [ossa] @word_zextOrBitCast : $(Builtin.Int32, Builtin.Word) -> (Builtin.Word, Builtin.Int64) {
3939
entry(%i : $Builtin.Int32, %w : $Builtin.Word):
4040
%j = builtin "zextOrBitCast_Int32_Word"(%i : $Builtin.Int32) : $Builtin.Word
4141
%v = builtin "zextOrBitCast_Word_Int64"(%w : $Builtin.Word) : $Builtin.Int64
@@ -57,7 +57,7 @@ entry(%i : $Builtin.Int32, %w : $Builtin.Word):
5757
// ARM32: %4 = insertvalue { i32, i32 } %3, i32 %2, 1
5858
// ARM32: ret { i32, i32 } %4
5959
// ARM32: }
60-
sil @word_truncOrBitCast : $(Builtin.Word, Builtin.Int64) -> (Builtin.Int32, Builtin.Word) {
60+
sil [ossa] @word_truncOrBitCast : $(Builtin.Word, Builtin.Int64) -> (Builtin.Int32, Builtin.Word) {
6161
entry(%w : $Builtin.Word, %i : $Builtin.Int64):
6262
%v = builtin "truncOrBitCast_Word_Int32"(%w : $Builtin.Word) : $Builtin.Int32
6363
%j = builtin "truncOrBitCast_Int64_Word"(%i : $Builtin.Int64) : $Builtin.Word

test/IRGen/class_isa_pointers.sil

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ sil_vtable Purebred {}
2222
// CHECK: [[ISA:%.*]] = load %swift.type*, %swift.type** [[ISA_PTR]]
2323
// CHECK: [[VTABLE:%.*]] = bitcast %swift.type* [[ISA]]
2424
// CHECK: getelementptr inbounds {{.*}} [[VTABLE]]
25-
sil @purebred_method : $@convention(thin) (@owned Purebred) -> () {
25+
sil [ossa] @purebred_method : $@convention(thin) (@owned Purebred) -> () {
2626
entry(%0 : @owned $Purebred):
2727
%m = class_method %0 : $Purebred, #Purebred.method!1 : (Purebred) -> () -> (), $@convention(method) (@guaranteed Purebred) -> ()
2828
%z = apply %m(%0) : $@convention(method) (@guaranteed Purebred) -> ()
@@ -46,7 +46,7 @@ sil_vtable Mongrel {}
4646
// CHECK: [[ISA:%.*]] = inttoptr i64 [[T3]] to %swift.type*
4747
// CHECK: [[VTABLE:%.*]] = bitcast %swift.type* [[ISA]]
4848
// CHECK: getelementptr inbounds {{.*}} [[VTABLE]]
49-
sil @mongrel_method : $@convention(thin) (@owned Mongrel) -> () {
49+
sil [ossa] @mongrel_method : $@convention(thin) (@owned Mongrel) -> () {
5050
entry(%0 : @owned $Mongrel):
5151
%m = class_method %0 : $Mongrel, #Mongrel.method!1 : (Mongrel) -> () -> (), $@convention(method) (@guaranteed Mongrel) -> ()
5252
%z = apply %m(%0) : $@convention(method) (@guaranteed Mongrel) -> ()
@@ -55,15 +55,15 @@ entry(%0 : @owned $Mongrel):
5555

5656
// ObjC stubs expected by ObjC metadata emission
5757

58-
sil private @$s18class_isa_pointers7MongrelC6methodyyFTo : $@convention(objc_method) (Purebred) -> () {
58+
sil private [ossa] @$s18class_isa_pointers7MongrelC6methodyyFTo : $@convention(objc_method) (Purebred) -> () {
5959
entry(%0 : @unowned $Purebred):
6060
unreachable
6161
}
62-
sil private @$s18class_isa_pointers7MongrelC7bellsOnACSgSi_tcfcTo : $@convention(objc_method) (Int, Purebred) -> () {
62+
sil private [ossa] @$s18class_isa_pointers7MongrelC7bellsOnACSgSi_tcfcTo : $@convention(objc_method) (Int, Purebred) -> () {
6363
entry(%0 : $Int, %1 : @unowned $Purebred):
6464
unreachable
6565
}
66-
sil private @$s18class_isa_pointers7MongrelCACycfcTo : $@convention(objc_method) (Purebred) -> () {
66+
sil private [ossa] @$s18class_isa_pointers7MongrelCACycfcTo : $@convention(objc_method) (Purebred) -> () {
6767
entry(%0 : @unowned $Purebred):
6868
unreachable
6969
}

test/IRGen/completely_fragile_class_layout.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ bb0:
181181

182182
// CHECK-LABEL: define swiftcc {{(dllexport )?}}{{(protected )?}}i64 @accessClassWithResilientField(%T31completely_fragile_class_layout23ClassWithResilientFieldC*)
183183
sil @accessClassWithResilientField : $@convention(thin) (@guaranteed ClassWithResilientField) -> Int {
184-
bb0(%0 : @guaranteed $ClassWithResilientField):
184+
bb0(%0 : $ClassWithResilientField):
185185

186186
// CHECK: [[OFFSET:%.*]] = load i64, i64* @"$s31completely_fragile_class_layout23ClassWithResilientFieldC5thirdSivpWvd", align 8
187187
// CHECK-NEXT: [[SELF_ADDR:%.*]] = bitcast %T31completely_fragile_class_layout23ClassWithResilientFieldC* %0 to i8*
@@ -192,7 +192,7 @@ bb0(%0 : @guaranteed $ClassWithResilientField):
192192
%1 = ref_element_addr %0 : $ClassWithResilientField, #ClassWithResilientField.third
193193

194194
// CHECK-NEXT: [[VALUE:%.*]] = load i64, i64* [[FIELD_PTR]], align 8
195-
%2 = load [trivial] %1 : $*Int
195+
%2 = load %1 : $*Int
196196

197197
// CHECK-NEXT: ret i64 [[VALUE]]
198198
return %2 : $Int

test/IRGen/copy_value_destroy_value.sil

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct Foo {
1919
// CHECK: define{{( protected)?}} swiftcc void @trivial_arg(
2020
// CHECK-NEXT: entry
2121
// CHECK-NEXT: ret void
22-
sil @trivial_arg : $@convention(thin) (Builtin.Int32) -> () {
22+
sil [ossa] @trivial_arg : $@convention(thin) (Builtin.Int32) -> () {
2323
bb0(%0 : $Builtin.Int32):
2424
%1 = copy_value %0 : $Builtin.Int32
2525
destroy_value %1 : $Builtin.Int32
@@ -36,7 +36,7 @@ bb0(%0 : $Builtin.Int32):
3636
// CHECK: call %swift.refcounted* @swift_retain(%swift.refcounted* returned [[VAL2]])
3737
// CHECK: call void @swift_release(%swift.refcounted* [[VAL1]])
3838
// CHECK: call void @swift_release(%swift.refcounted* [[VAL2]])
39-
sil @non_trivial : $@convention(thin) (@guaranteed Foo) -> () {
39+
sil [ossa] @non_trivial : $@convention(thin) (@guaranteed Foo) -> () {
4040
bb0(%0 : @guaranteed $Foo):
4141
%1 = copy_value %0 : $Foo
4242
destroy_value %1 : $Foo
@@ -47,7 +47,7 @@ bb0(%0 : @guaranteed $Foo):
4747
// CHECK: define{{( protected)?}} swiftcc void @non_trivial_unowned(
4848
// CHECK: call %swift.refcounted* @swift_unownedRetainStrong(%swift.refcounted* returned %0)
4949
// CHECK: call void @swift_release(%swift.refcounted* %0)
50-
sil @non_trivial_unowned : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
50+
sil [ossa] @non_trivial_unowned : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
5151
bb0(%0 : @guaranteed $Builtin.NativeObject):
5252
%1 = ref_to_unowned %0 : $Builtin.NativeObject to $@sil_unowned Builtin.NativeObject
5353
%2 = copy_unowned_value %1 : $@sil_unowned Builtin.NativeObject

0 commit comments

Comments
 (0)