Skip to content

Commit 022abe4

Browse files
committed
NFC: Update tests to use accepted spelling for @backDeployed.
1 parent d2524a6 commit 022abe4

21 files changed

+188
-180
lines changed

test/IDE/complete_decl_attribute.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ actor MyGlobalActor {
9292
// KEYWORD2-NEXT: Keyword/None: noDerivative[#Func Attribute#]; name=noDerivative
9393
// KEYWORD2-NEXT: Keyword/None: Sendable[#Func Attribute#]; name=Sendable
9494
// KEYWORD2-NEXT: Keyword/None: preconcurrency[#Func Attribute#]; name=preconcurrency
95+
// KEYWORD2-NEXT: Keyword/None: backDeployed[#Func Attribute#]; name=backDeployed
9596
// KEYWORD2-NOT: Keyword
9697
// KEYWORD2-DAG: Decl[Struct]/CurrModule: MyStruct[#MyStruct#]; name=MyStruct
9798
// KEYWORD2-DAG: Decl[Struct]/CurrModule: MyPropertyWrapper[#MyPropertyWrapper#]; name=MyPropertyWrapper
@@ -241,6 +242,7 @@ struct _S {
241242
// ON_METHOD-DAG: Keyword/None: Sendable[#Func Attribute#]; name=Sendable
242243
// ON_METHOD-DAG: Keyword/None: noDerivative[#Func Attribute#]; name=noDerivative
243244
// ON_METHOD-DAG: Keyword/None: preconcurrency[#Func Attribute#]; name=preconcurrency
245+
// ON_METHOD-DAG: Keyword/None: backDeployed[#Func Attribute#]; name=backDeployed
244246
// ON_METHOD-NOT: Keyword
245247
// ON_METHOD-DAG: Decl[Struct]/CurrModule: MyStruct[#MyStruct#]; name=MyStruct
246248
// ON_METHOD-DAG: Decl[Struct]/CurrModule: MyPropertyWrapper[#MyPropertyWrapper#]; name=MyPropertyWrapper

test/IRGen/weak_import_back_deployed_attr.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//--- Library.swift
1111

1212
@available(macOS 10.50, *)
13-
@_backDeploy(before: macOS 10.60)
13+
@backDeployed(before: macOS 10.60)
1414
public func backDeployedFunc() {}
1515

1616
//--- Client.swift

test/ModuleInterface/back-deployed-attr.swift

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,37 @@
66
// RUN: %FileCheck %s < %t/Test.swiftinterface
77

88
public struct TopLevelStruct {
9+
// TODO: Print `@backDeployed` in swiftinterfaces (rdar://104920183)
910
// CHECK: @_backDeploy(before: macOS 12.0)
1011
// CHECK: public func backDeployedFunc_SinglePlatform() -> Swift.Int { return 42 }
11-
@_backDeploy(before: macOS 12.0)
12+
@backDeployed(before: macOS 12.0)
1213
public func backDeployedFunc_SinglePlatform() -> Int { return 42 }
1314

1415
// CHECK: @_backDeploy(before: macOS 12.0, iOS 15.0)
1516
// CHECK: public func backDeployedFunc_MultiPlatform() -> Swift.Int { return 43 }
16-
@_backDeploy(before: macOS 12.0, iOS 15.0)
17+
@backDeployed(before: macOS 12.0, iOS 15.0)
1718
public func backDeployedFunc_MultiPlatform() -> Int { return 43 }
1819

1920
// CHECK: @_backDeploy(before: macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0)
2021
// CHECK: public func backDeployedFunc_MultiPlatformSeparate() -> Swift.Int { return 43 }
21-
@_backDeploy(before: macOS 12.0)
22-
@_backDeploy(before: iOS 15.0)
23-
@_backDeploy(before: watchOS 8.0)
24-
@_backDeploy(before: tvOS 15.0)
22+
@backDeployed(before: macOS 12.0)
23+
@backDeployed(before: iOS 15.0)
24+
@backDeployed(before: watchOS 8.0)
25+
@backDeployed(before: tvOS 15.0)
2526
public func backDeployedFunc_MultiPlatformSeparate() -> Int { return 43 }
2627

2728
// CHECK: @_backDeploy(before: macOS 12.0)
2829
// CHECK: public var backDeployedComputedProperty: Swift.Int {
2930
// CHECK: get { 44 }
3031
// CHECK: }
31-
@_backDeploy(before: macOS 12.0)
32+
@backDeployed(before: macOS 12.0)
3233
public var backDeployedComputedProperty: Int { 44 }
3334

3435
// CHECK: @_backDeploy(before: macOS 12.0)
3536
// CHECK: public var backDeployedPropertyWithAccessors: Swift.Int {
3637
// CHECK: get { 45 }
3738
// CHECK: }
38-
@_backDeploy(before: macOS 12.0)
39+
@backDeployed(before: macOS 12.0)
3940
public var backDeployedPropertyWithAccessors: Int {
4041
get { 45 }
4142
}
@@ -44,25 +45,25 @@ public struct TopLevelStruct {
4445
// CHECK: public subscript(index: Swift.Int) -> Swift.Int {
4546
// CHECK: get { 46 }
4647
// CHECK: }
47-
@_backDeploy(before: macOS 12.0)
48+
@backDeployed(before: macOS 12.0)
4849
public subscript(index: Int) -> Int {
4950
get { 46 }
5051
}
5152
}
5253

5354
// CHECK: @_backDeploy(before: macOS 12.0)
5455
// CHECK: public func backDeployTopLevelFunc1() -> Swift.Int { return 47 }
55-
@_backDeploy(before: macOS 12.0)
56+
@backDeployed(before: macOS 12.0)
5657
public func backDeployTopLevelFunc1() -> Int { return 47 }
5758

5859
// MARK: - Availability macros
5960

6061
// CHECK: @_backDeploy(before: macOS 12.1)
6162
// CHECK: public func backDeployTopLevelFunc2() -> Swift.Int { return 48 }
62-
@_backDeploy(before: _macOS12_1)
63+
@backDeployed(before: _macOS12_1)
6364
public func backDeployTopLevelFunc2() -> Int { return 48 }
6465

6566
// CHECK: @_backDeploy(before: macOS 12.1, iOS 15.1)
6667
// CHECK: public func backDeployTopLevelFunc3() -> Swift.Int { return 49 }
67-
@_backDeploy(before: _myProject 1.0)
68+
@backDeployed(before: _myProject 1.0)
6869
public func backDeployTopLevelFunc3() -> Int { return 49 }

test/SILGen/back_deployed_attr.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
// REQUIRES: OS=macosx
88

9-
@_backDeploy(before: macOS 10.52)
9+
@backDeployed(before: macOS 10.52)
1010
public func someFunc() {}
1111

1212
public struct S<T> {
1313
@usableFromInline var _x: T
1414

15-
@_backDeploy(before: macOS 10.52)
15+
@backDeployed(before: macOS 10.52)
1616
public var x: T {
1717
get { _x }
1818
set { _x = newValue }
@@ -59,7 +59,7 @@ func aeicCaller(_ s: inout S<Z>) {
5959
}
6060

6161
// CHECK-LABEL: sil non_abi [serialized] [ossa] @$s11back_deploy0A14DeployedCalleryyAA1SVyAA1ZVGzFTwB
62-
@_backDeploy(before: macOS 10.52)
62+
@backDeployed(before: macOS 10.52)
6363
public func backDeployedCaller(_ s: inout S<Z>) {
6464
// CHECK: function_ref @$s11back_deploy8someFuncyyFTwb : $@convention(thin) () -> ()
6565
someFunc()

test/SILGen/back_deployed_attr_accessor.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public struct TopLevelStruct {
3535

3636
// -- Original definition of TopLevelStruct.property.getter
3737
// CHECK-LABEL: sil [available 10.52] [ossa] @$s11back_deploy14TopLevelStructV8propertyACvg : $@convention(method) (TopLevelStruct) -> TopLevelStruct
38-
@_backDeploy(before: macOS 10.52)
38+
@backDeployed(before: macOS 10.52)
3939
public var property: TopLevelStruct { self }
4040
}
4141

test/SILGen/back_deployed_attr_accessor_coroutine.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public struct TopLevelStruct {
6262

6363
// -- Original definition of TopLevelStruct.property.read
6464
// CHECK-LABEL: sil [available 10.52] [ossa] @$s11back_deploy14TopLevelStructV8propertyACvr : $@yield_once @convention(method) (TopLevelStruct) -> @yields TopLevelStruct
65-
@_backDeploy(before: macOS 10.52)
65+
@backDeployed(before: macOS 10.52)
6666
public var property: TopLevelStruct {
6767
_read { yield self }
6868
}

test/SILGen/back_deployed_attr_async_func.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
// -- Original definition of trivialFunc()
4444
// CHECK-LABEL: sil [available 10.52] [ossa] @$s11back_deploy9asyncFuncyyYaF : $@convention(thin) @async () -> ()
4545
@available(macOS 10.51, *)
46-
@_backDeploy(before: macOS 10.52)
46+
@backDeployed(before: macOS 10.52)
4747
public func asyncFunc() async {
4848
await otherFunc()
4949
}

test/SILGen/back_deployed_attr_func.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
// -- Original definition of trivialFunc()
3838
// CHECK-LABEL: sil [available 10.52] [ossa] @$s11back_deploy11trivialFuncyyF : $@convention(thin) () -> ()
39-
@_backDeploy(before: macOS 10.52)
39+
@backDeployed(before: macOS 10.52)
4040
public func trivialFunc() {}
4141

4242
// -- Fallback definition of isNumber(_:)
@@ -70,7 +70,7 @@ public func trivialFunc() {}
7070

7171
// -- Original definition of isNumber(_:)
7272
// CHECK-LABEL: sil [available 10.52] [ossa] @$s11back_deploy8isNumberySbSiF : $@convention(thin) (Int) -> Bool
73-
@_backDeploy(before: macOS 10.52)
73+
@backDeployed(before: macOS 10.52)
7474
public func isNumber(_ x: Int) -> Bool {
7575
return true
7676
}

test/SILGen/back_deployed_attr_generic_func.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
// -- Original definition of genericFunc(_:)
3939
// CHECK-LABEL: sil [available 10.52] [ossa] @$s11back_deploy11genericFuncyxxlF : $@convention(thin) <T> (@in_guaranteed T) -> @out T
40-
@_backDeploy(before: macOS 10.52)
40+
@backDeployed(before: macOS 10.52)
4141
public func genericFunc<T>(_ t: T) -> T {
4242
return t
4343
}
@@ -76,7 +76,7 @@ public func genericFunc<T>(_ t: T) -> T {
7676

7777
// -- Original definition of genericFuncWithOwnedParam(_:)
7878
// CHECK-LABEL: sil [available 10.52] [ossa] @$s11back_deploy25genericFuncWithOwnedParamyyxnlF : $@convention(thin) <T> (@in T) -> ()
79-
@_backDeploy(before: macOS 10.52)
79+
@backDeployed(before: macOS 10.52)
8080
public func genericFuncWithOwnedParam<T>(_ t: __owned T) { }
8181

8282
struct S {}

test/SILGen/back_deployed_attr_struct_init.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public struct TopLevelStruct<T> {
5656
// -- Original definition of TopLevelStruct.init(_:)
5757
// CHECK-LABEL: sil [available 10.52] [ossa] @$s11back_deploy14TopLevelStructVyACyxGxcfC : $@convention(method) <T> (@in T, @thin TopLevelStruct<T>.Type) -> @out TopLevelStruct<T>
5858
@available(macOS 10.51, *)
59-
@_backDeploy(before: macOS 10.52)
59+
@backDeployed(before: macOS 10.52)
6060
public init(_ t: T) {
6161
self.t = t
6262
}

test/SILGen/back_deployed_attr_struct_method.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public struct TopLevelStruct {
3737

3838
// -- Original definition of TopLevelStruct.trivialMethod()
3939
// CHECK-LABEL: sil [available 10.52] [ossa] @$s11back_deploy14TopLevelStructV13trivialMethodyyF : $@convention(method) (TopLevelStruct) -> ()
40-
@_backDeploy(before: macOS 10.52)
40+
@backDeployed(before: macOS 10.52)
4141
public func trivialMethod() {}
4242
}
4343

test/SILGen/back_deployed_attr_throwing_func.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
// -- Original definition of throwingFunc()
5151
// CHECK-LABEL: sil [available 10.52] [ossa] @$s11back_deploy12throwingFuncyyKF : $@convention(thin) () -> @error any Error
52-
@_backDeploy(before: macOS 10.52)
52+
@backDeployed(before: macOS 10.52)
5353
public func throwingFunc() throws {}
5454

5555
// CHECK-LABEL: sil hidden [ossa] @$s11back_deploy6calleryyKF : $@convention(thin) () -> @error any Error

test/SILGen/opaque_values_silgen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,5 +643,5 @@ func giveKeyPathString() {
643643
// CHECK-NOT: {{bb[0-9]+}}({{%[^,]+}} : @owned $τ_0_0):
644644
// CHECK-LABEL: } // end sil function '$s20opaque_values_silgen29backDeployingReturningGenericyxxKlFTwb'
645645
@available(SwiftStdlib 5.1, *)
646-
@_backDeploy(before: SwiftStdlib 5.8)
646+
@backDeployed(before: SwiftStdlib 5.8)
647647
public func backDeployingReturningGeneric<T>(_ t: T) throws -> T { t }

test/Sema/availability_define.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ public func forbidMacrosInInlinableCode1() {
9696
}
9797
}
9898

99-
@_backDeploy(before: _iOS9Aligned)
99+
@backDeployed(before: _iOS9Aligned)
100100
public func forbidMacrosInInlinableCode2() {
101-
if #available(_iOS9Aligned, *) { } // expected-error {{availability macro cannot be used in a '@_backDeploy' function}}
102-
if #available(_iOS9, _macOS10_11, *) { } // expected-error {{availability macro cannot be used in a '@_backDeploy' function}}
103-
if #available(iOS 9.0, _macOS10_11, tvOS 9.0, *) { } // expected-error {{availability macro cannot be used in a '@_backDeploy' function}}
104-
if #unavailable(_iOS9Aligned) { } // expected-error {{availability macro cannot be used in a '@_backDeploy' function}}
105-
if #unavailable(_iOS9, _macOS10_11) { } // expected-error {{availability macro cannot be used in a '@_backDeploy' function}}
106-
if #unavailable(iOS 9.0, _macOS10_11, tvOS 9.0) { } // expected-error {{availability macro cannot be used in a '@_backDeploy' function}}
101+
if #available(_iOS9Aligned, *) { } // expected-error {{availability macro cannot be used in a '@backDeployed' function}}
102+
if #available(_iOS9, _macOS10_11, *) { } // expected-error {{availability macro cannot be used in a '@backDeployed' function}}
103+
if #available(iOS 9.0, _macOS10_11, tvOS 9.0, *) { } // expected-error {{availability macro cannot be used in a '@backDeployed' function}}
104+
if #unavailable(_iOS9Aligned) { } // expected-error {{availability macro cannot be used in a '@backDeployed' function}}
105+
if #unavailable(_iOS9, _macOS10_11) { } // expected-error {{availability macro cannot be used in a '@backDeployed' function}}
106+
if #unavailable(iOS 9.0, _macOS10_11, tvOS 9.0) { } // expected-error {{availability macro cannot be used in a '@backDeployed' function}}
107107
doIt {
108-
if #available(_iOS9Aligned, *) { } // expected-error {{availability macro cannot be used in a '@_backDeploy' function}}
108+
if #available(_iOS9Aligned, *) { } // expected-error {{availability macro cannot be used in a '@backDeployed' function}}
109109
}
110110
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// RUN: %target-swift-frontend -parse-as-library -enable-library-evolution -emit-module -module-name Test -experimental-skip-non-inlinable-function-bodies %s
22

3-
@_backDeploy(before: SwiftStdlib 5.7)
3+
@backDeployed(before: SwiftStdlib 5.7)
44
public func foo() {}

0 commit comments

Comments
 (0)