Skip to content

Commit 8037458

Browse files
committed
IRGen: Fix formatting in objc_type_encoding test
1 parent 6a94bdc commit 8037458

File tree

1 file changed

+25
-24
lines changed

1 file changed

+25
-24
lines changed

test/IRGen/objc_type_encoding.swift

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ import gizmo
4141

4242
@objc func testOptionalPrimitives()
4343
-> OpaquePointer? { return nil }
44-
// CHECK-macosx: private unnamed_addr constant [9 x i8] c"^v16@0:8\00"
45-
// CHECK-ios: private unnamed_addr constant [9 x i8] c"^v16@0:8\00"
46-
// CHECK-tvos: private unnamed_addr constant [9 x i8] c"^v16@0:8\00"
44+
// CHECK-macosx: private unnamed_addr constant [9 x i8] c"^v16@0:8\00"
45+
// CHECK-ios: private unnamed_addr constant [9 x i8] c"^v16@0:8\00"
46+
// CHECK-tvos: private unnamed_addr constant [9 x i8] c"^v16@0:8\00"
4747

4848
@objc func testCSignedTypes(_ a: CSignedChar, b: CShort, c: CInt, d: CLong, e: CLongLong) {}
4949
// CHECK-macosx: private unnamed_addr constant [23 x i8] c"v44@0:8c16s20i24q28q36\00"
@@ -71,68 +71,69 @@ import gizmo
7171
// CHECK-tvos: private unnamed_addr constant [20 x i8] c"v36@0:8c16s20i24q28\00"
7272

7373
@objc class func getSelf() -> Methods.Type { return self }
74-
// These strings are required for another purpose and so are tested above.
74+
// These strings are required for another purpose and so are tested above.
7575

7676
@objc func getDynamicSelf() -> Self { return self }
77-
// CHECK-macosx: private unnamed_addr constant [8 x i8] c"@16@0:8\00"
78-
// CHECK-ios: private unnamed_addr constant [8 x i8] c"@16@0:8\00"
79-
// CHECK-tvos: private unnamed_addr constant [8 x i8] c"@16@0:8\00"
77+
// CHECK-macosx: private unnamed_addr constant [8 x i8] c"@16@0:8\00"
78+
// CHECK-ios: private unnamed_addr constant [8 x i8] c"@16@0:8\00"
79+
// CHECK-tvos: private unnamed_addr constant [8 x i8] c"@16@0:8\00"
8080

81-
func testId(_ s: AnyObject) -> AnyObject { return self }
81+
@objc func testId(_ s: AnyObject) -> AnyObject { return self }
8282
// CHECK-macosx: private unnamed_addr constant [11 x i8] c"@24@0:8@16\00"
8383
// CHECK-ios: private unnamed_addr constant [11 x i8] c"@24@0:8@16\00"
8484
// CHECK-tvos: private unnamed_addr constant [11 x i8] c"@24@0:8@16\00"
8585

86-
@objc func comp1(_ a: P1 & P2, b: P1 & P2 & P3) -> P1 & P2 { return a }
86+
@objc func comp1(_ a: P1 & P2, b: P1 & P2 & P3) -> P1 & P2 { return a }
8787
// CHECK-macosx: private unnamed_addr constant [14 x i8] c"@32@0:8@16@24\00"
8888
// CHECK-ios: private unnamed_addr constant [14 x i8] c"@32@0:8@16@24\00"
8989
// CHECK-tvos: private unnamed_addr constant [14 x i8] c"@32@0:8@16@24\00"
9090

91-
@objc func returnsBool(_ b : Bool) -> Bool { return b }
91+
@objc func returnsBool(_ b : Bool) -> Bool { return b }
9292
// CHECK-macosx: private unnamed_addr constant [11 x i8] c"c20@0:8c16\00"
9393
// CHECK-ios: private unnamed_addr constant [11 x i8] c"B20@0:8B16\00"
9494
// CHECK-tvos: private unnamed_addr constant [11 x i8] c"B20@0:8B16\00"
9595

96-
@objc func comp1(_ a: Methods, b: Methods, c: Methods) -> Methods { return a }
96+
@objc func comp1(_ a: Methods, b: Methods, c: Methods) -> Methods { return a }
9797
// CHECK-macosx: private unnamed_addr constant [17 x i8] c"@40@0:8@16@24@32\00"
9898
// CHECK-ios: private unnamed_addr constant [17 x i8] c"@40@0:8@16@24@32\00"
9999
// CHECK-tvos: private unnamed_addr constant [17 x i8] c"@40@0:8@16@24@32\00"
100100

101-
@objc func passSelector(_ aSelector : Selector) {}
101+
@objc func passSelector(_ aSelector : Selector) {}
102102
// CHECK-macosx: private unnamed_addr constant [11 x i8] c"v24@0:8:16\00"
103103
// CHECK-ios: private unnamed_addr constant [11 x i8] c"v24@0:8:16\00"
104104
// CHECK-tvos: private unnamed_addr constant [11 x i8] c"v24@0:8:16\00"
105105

106-
@objc func copyUnsafeMutablePointer(_ p: UnsafeMutablePointer<Int32>) -> UnsafeMutablePointer<Int32> { return p }
106+
@objc func copyUnsafeMutablePointer(_ p: UnsafeMutablePointer<Int32>) -> UnsafeMutablePointer<Int32> { return p }
107107
// CHECK-macosx: private unnamed_addr constant [13 x i8] c"^i24@0:8^i16\00"
108108
// CHECK-ios: private unnamed_addr constant [13 x i8] c"^i24@0:8^i16\00"
109109
// CHECK-tvos: private unnamed_addr constant [13 x i8] c"^i24@0:8^i16\00"
110110

111-
@objc func copyUnsafeMutablePointerInt(_ p: UnsafeMutablePointer<Int>) -> UnsafeMutablePointer<Int> { return p }
111+
@objc func copyUnsafeMutablePointerInt(_ p: UnsafeMutablePointer<Int>) -> UnsafeMutablePointer<Int> { return p }
112112
// CHECK-macosx: private unnamed_addr constant [13 x i8] c"^q24@0:8^q16\00"
113113
// CHECK-ios: private unnamed_addr constant [13 x i8] c"^q24@0:8^q16\00"
114114
// CHECK-tvos: private unnamed_addr constant [13 x i8] c"^q24@0:8^q16\00"
115115

116-
func testArchetype(_ work: P3) {
117-
}
116+
@objc func testArchetype(_ work: P3) {
117+
}
118118
// CHECK-macosx: private unnamed_addr constant [11 x i8] c"v24@0:8@16\00"
119119
// CHECK-ios: private unnamed_addr constant [11 x i8] c"v24@0:8@16\00"
120120
// CHECK-tvos: private unnamed_addr constant [11 x i8] c"v24@0:8@16\00"
121121

122-
@objc func foo(_ x: (Int) -> Int) -> Int {
123-
return 1
124-
}
122+
@objc func foo(_ x: (Int) -> Int) -> Int {
123+
return 1
124+
}
125125
// CHECK-macosx: private unnamed_addr constant [12 x i8] c"q24@0:8@?16\00"
126126
// CHECK-ios: private unnamed_addr constant [12 x i8] c"q24@0:8@?16\00"
127127
// CHECK-tvos: private unnamed_addr constant [12 x i8] c"q24@0:8@?16\00"
128128

129-
@objc func returnNSRadixedOptions() -> NSRadixedOptions {
129+
@objc func returnNSRadixedOptions() -> NSRadixedOptions {
130130
return .octal
131131
}
132132
// CHECK-macosx: [[ENUMENCODING:@.*]] = private unnamed_addr constant [8 x i8] c"i16@0:8\00"
133133
// CHECK-ios: [[ENUMENCODING:@.*]] = private unnamed_addr constant [8 x i8] c"i16@0:8\00"
134134
// CHECK-tvos: [[ENUMENCODING:@.*]] = private unnamed_addr constant [8 x i8] c"i16@0:8\00"
135-
@objc func returnChoseNSRadixedOptions(_ choice: NSRadixedOptions) -> NSRadixedOptions {
135+
136+
@objc func returnChoseNSRadixedOptions(_ choice: NSRadixedOptions) -> NSRadixedOptions {
136137
switch choice {
137138
case .octal: return .hex
138139
case .hex: return .octal
@@ -142,7 +143,7 @@ func testArchetype(_ work: P3) {
142143
// CHECK-ios: private unnamed_addr constant [11 x i8] c"i20@0:8i16\00"
143144
// CHECK-tvos: private unnamed_addr constant [11 x i8] c"i20@0:8i16\00"
144145

145-
@objc func getRawEnumInGizmo() -> RawEnumInGizmo {
146+
@objc func getRawEnumInGizmo() -> RawEnumInGizmo {
146147
return InGizmoTwo
147148
}
148149
// CHECK-macosx: { i8* getelementptr inbounds ([18 x i8], [18 x i8]* @"\01L_selector_data(getRawEnumInGizmo)", i64 0, i64 0),
@@ -160,8 +161,8 @@ func testArchetype(_ work: P3) {
160161

161162
@objc protocol MyProtocol {
162163
func myMethod2(_ arg : NSRuncing & NSFunging)
163-
func readWithAuthorization(_ authData : Gizmo, reply : (NSView, NSSpoon) -> Void)
164-
func doSomething(_ context: MyCustomObject)
164+
func readWithAuthorization(_ authData : Gizmo, reply : (NSView, NSSpoon) -> Void)
165+
func doSomething(_ context: MyCustomObject)
165166
}
166167

167168
// CHECK-macosx: [[ENC1:@.*]] = private unnamed_addr constant [35 x i8] c"v24@0:8@\22<NSFunging><NSRuncing>\2216\00"

0 commit comments

Comments
 (0)