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

0 commit comments

Comments
 (0)