Skip to content

Commit 273b149

Browse files
committed
Fix a swift argument initialization bug - swift argument should be initialized
after argc and argv are initialized. rdar://24250684 I reordered the CHECK statements in some tests to make them pass. I tested this on Darwin and Linux.
1 parent 35e0cd5 commit 273b149

19 files changed

+161
-141
lines changed

stdlib/public/core/Process.swift

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,27 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
public enum Process {
14-
/// The list of command-line arguments with which the current
15-
/// process was invoked.
16-
public static let arguments: [String] = {
17-
// Use lazy initialization of static properties to safely initialize the
18-
// public 'arguments' property on first use.
19-
(0..<Int(argc)).map { i in
20-
String.fromCStringRepairingIllFormedUTF8(unsafeArgv[i]).0 ?? ""
14+
/// Initialize the swift argument with the list of command-line arguments
15+
/// with which the current process was invoked.
16+
public static func initArguments() {
17+
for i in 0..<Int(argc) {
18+
_arguments.append(
19+
String.fromCStringRepairingIllFormedUTF8(unsafeArgv[i]).0 ?? "")
2120
}
22-
}()
21+
}
2322

2423
internal static var _argc: CInt = CInt()
2524
internal static var _unsafeArgv:
2625
UnsafeMutablePointer<UnsafeMutablePointer<Int8>>
2726
= nil
2827

28+
internal static var _arguments : [String] = [String]()
29+
30+
/// Access to the swift arguments.
31+
public static var arguments : [String] {
32+
return _arguments;
33+
}
34+
2935
/// Access to the raw argc value from C.
3036
public static var argc: CInt {
3137
return _argc
@@ -49,5 +55,8 @@ func _didEnterMain(
4955
// values that were passed in to main.
5056
Process._argc = CInt(argc)
5157
Process._unsafeArgv = UnsafeMutablePointer(argv)
58+
59+
// Initialize the swift arguments.
60+
Process.initArguments();
5261
}
5362

test/ClangModules/attr-swift_private.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@ public func testTopLevel() {
8484
#endif
8585
}
8686

87-
// CHECK-LABEL: define linkonce_odr hidden %swift.type* @_TMaCSo12__PrivFooSub{{.*}} {
88-
// CHECK: %objc_class* @"OBJC_CLASS_$_PrivFooSub"
89-
// CHECK: }
90-
9187
// CHECK-LABEL: define linkonce_odr hidden {{.+}} @_TTOFCSo3BarcfT2__Vs5Int32_GSQS__
9288
// CHECK: @"\01L_selector(init:)"
9389
// CHECK-LABEL: define linkonce_odr hidden {{.+}} @_TTOFCSo3BarcfT9__twoArgsVs5Int325otherS0__GSQS__
@@ -97,6 +93,13 @@ public func testTopLevel() {
9793
// CHECK-LABEL: define linkonce_odr hidden {{.+}} @_TTOFCSo3BarcfT8__noArgsT__GSQS__
9894
// CHECK: @"\01L_selector(initWithNoArgs)"
9995

96+
97+
98+
// CHECK-LABEL: define linkonce_odr hidden %swift.type* @_TMaCSo12__PrivFooSub{{.*}} {
99+
// CHECK: %objc_class* @"OBJC_CLASS_$_PrivFooSub"
100+
// CHECK: }
101+
102+
100103
_ = __PrivAnonymousA
101104
_ = __E0PrivA
102105
_ = __PrivE1A as __PrivE1

test/IRGen/c_globals.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import c_layout
66
func blackHole<T>(t: T) { }
77

88
// CHECK: @staticFloat = internal global float 1.700000e+01, align 4
9-
// CHECK: define internal void @doubleTrouble() [[CLANG_FUNC_ATTR:#[0-9]+]] {
109

1110
public func testStaticGlobal() {
1211
blackHole(c_layout.staticFloat)
@@ -31,5 +30,7 @@ public func testCaptureGlobal() {
3130
}) // CHECK: {{^}$}}
3231
}
3332

33+
// CHECK: define internal void @doubleTrouble() [[CLANG_FUNC_ATTR:#[0-9]+]] {
34+
3435
// CHECK: attributes [[SWIFT_FUNC_ATTR]] = { "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "target-cpu"
3536
// CHECK: attributes [[CLANG_FUNC_ATTR]] = { inlinehint nounwind {{(ssp )?}}{{(uwtable )?}}"no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "target-cpu"

test/IRGen/clang_inline.swift

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,17 @@ class CallStaticInline {
2121
func ReturnZero() -> Int64 { return Int64(zero()) }
2222
}
2323

24-
// CHECK-LABEL: define internal i32 @zero()
25-
// CHECK: [[INLINEHINT_SSP_UWTABLE:#[0-9]+]] {
26-
2724
// CHECK-LABEL: define hidden i64 @_TFC12clang_inline17CallStaticInline210ReturnZerofT_Vs5Int64(%C12clang_inline17CallStaticInline2*) {{.*}} {
2825
class CallStaticInline2 {
2926
func ReturnZero() -> Int64 { return Int64(wrappedZero()) }
3027
}
3128

32-
// CHECK-LABEL: define internal i32 @wrappedZero()
33-
// CHECK: [[INLINEHINT_SSP_UWTABLE:#[0-9]+]] {
3429

3530
// CHECK-LABEL: define hidden i32 @_TF12clang_inline10testExternFT_Vs5Int32() {{.*}} {
3631
func testExtern() -> CInt {
3732
return wrappedGetInt()
3833
}
3934

40-
// CHECK-LABEL: define internal i32 @wrappedGetInt()
41-
// CHECK: [[INLINEHINT_SSP_UWTABLE:#[0-9]+]] {
42-
4335
// CHECK-LABEL: define hidden i32 @_TF12clang_inline16testAlwaysInlineFT_Vs5Int32()
4436
// CHECK: [[SSP:#[0-9]+]] {
4537
// NEGATIVE-NOT: @alwaysInlineNumber
@@ -53,28 +45,37 @@ func testInlineRedeclared() -> CInt {
5345
return zeroRedeclared()
5446
}
5547

56-
// CHECK-LABEL: define internal i32 @zeroRedeclared() #{{[0-9]+}} {
57-
5848
// CHECK-LABEL: define hidden i32 @_TF12clang_inline27testInlineRedeclaredWrappedFT_Vs5Int32() {{.*}} {
5949
func testInlineRedeclaredWrapped() -> CInt {
6050
return wrappedZeroRedeclared()
6151
}
6252

63-
// CHECK-LABEL: define internal i32 @wrappedZeroRedeclared() #{{[0-9]+}} {
64-
6553
// CHECK-LABEL: define hidden i32 @_TF12clang_inline22testStaticButNotInlineFT_Vs5Int32() {{.*}} {
6654
func testStaticButNotInline() -> CInt {
6755
return staticButNotInline()
6856
}
6957

58+
// CHECK-LABEL: define internal i32 @zero()
59+
// CHECK: [[INLINEHINT_SSP_UWTABLE:#[0-9]+]] {
60+
61+
// CHECK-LABEL: define internal i32 @wrappedZero()
62+
// CHECK: [[INLINEHINT_SSP_UWTABLE:#[0-9]+]] {
63+
64+
// CHECK-LABEL: define internal i32 @wrappedGetInt()
65+
// CHECK: [[INLINEHINT_SSP_UWTABLE:#[0-9]+]] {
66+
67+
// CHECK-LABEL: define internal i32 @zeroRedeclared() #{{[0-9]+}} {
68+
69+
// CHECK-LABEL: define internal i32 @wrappedZeroRedeclared() #{{[0-9]+}} {
70+
7071
// CHECK-LABEL: define internal i32 @staticButNotInline() #{{[0-9]+}} {
7172

7273
// CHECK-LABEL: define internal i32 @innerZero()
7374
// CHECK: [[INNER_ZERO_ATTR:#[0-9]+]] {
7475
// CHECK-LABEL: declare i32 @getInt()
7576
// CHECK: [[GET_INT_ATTR:#[0-9]+]]
7677

77-
// CHECK: attributes [[INLINEHINT_SSP_UWTABLE]] = { inlinehint ssp {{.*}}}
7878
// CHECK: attributes [[SSP]] = { ssp {{.*}} }
79+
// CHECK: attributes [[INLINEHINT_SSP_UWTABLE]] = { inlinehint ssp {{.*}}}
7980
// CHECK: attributes [[INNER_ZERO_ATTR]] = { inlinehint nounwind ssp
8081
// CHECK: attributes [[GET_INT_ATTR]] = {

test/IRGen/clang_inline_reverse.swift

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,22 @@
77

88
import gizmo
99

10-
// CHECK-LABEL: define hidden i64 @_TFC12clang_inline16CallStaticInline10ReturnZerofT_Vs5Int64(%C12clang_inline16CallStaticInline*) {{.*}} {
11-
class CallStaticInline {
12-
func ReturnZero() -> Int64 { return Int64(wrappedZero()) }
13-
}
14-
15-
// CHECK-LABEL: define internal i32 @wrappedZero() {{#[0-9]+}} {
1610

1711
// CHECK-LABEL: define hidden i64 @_TFC12clang_inline17CallStaticInline210ReturnZerofT_Vs5Int64(%C12clang_inline17CallStaticInline2*) {{.*}} {
1812
class CallStaticInline2 {
1913
func ReturnZero() -> Int64 { return Int64(zero()) }
2014
}
2115

16+
// CHECK-LABEL: define hidden i64 @_TFC12clang_inline16CallStaticInline10ReturnZerofT_Vs5Int64(%C12clang_inline16CallStaticInline*) {{.*}} {
17+
class CallStaticInline {
18+
func ReturnZero() -> Int64 { return Int64(wrappedZero()) }
19+
}
20+
21+
2222
// CHECK-LABEL: define internal i32 @zero() {{#[0-9]+}} {
2323

24+
// CHECK-LABEL: define internal i32 @wrappedZero() {{#[0-9]+}} {
25+
2426
// CHECK-LABEL: define internal i32 @innerZero() {{#[0-9]+}} {
27+
28+

test/IRGen/class_resilience.swift

Lines changed: 31 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -110,24 +110,6 @@ public class MyResilientChild : MyResilientParent {
110110
public let field: Int32 = 0
111111
}
112112

113-
114-
// ClassWithResilientProperty metadata accessor
115-
116-
// CHECK-LABEL: define %swift.type* @_TMaC16class_resilience26ClassWithResilientProperty()
117-
// CHECK: [[CACHE:%.*]] = load %swift.type*, %swift.type** @_TMLC16class_resilience26ClassWithResilientProperty
118-
// CHECK-NEXT: [[COND:%.*]] = icmp eq %swift.type* [[CACHE]], null
119-
// CHECK-NEXT: br i1 [[COND]], label %cacheIsNull, label %cont
120-
121-
// CHECK: cacheIsNull:
122-
// CHECK-NEXT: [[METADATA:%.*]] = call %swift.type* @swift_getResilientMetadata(
123-
// CHECK-NEXT: store %swift.type* [[METADATA]], %swift.type** @_TMLC16class_resilience26ClassWithResilientProperty
124-
// CHECK-NEXT: br label %cont
125-
126-
// CHECK: cont:
127-
// CHECK-NEXT: [[RESULT:%.*]] = phi %swift.type* [ [[CACHE]], %entry ], [ [[METADATA]], %cacheIsNull ]
128-
// CHECK-NEXT: ret %swift.type* [[RESULT]]
129-
130-
131113
// ClassWithResilientProperty.color getter
132114

133115
// CHECK-LABEL: define i32 @_TFC16class_resilience26ClassWithResilientPropertyg5colorVs5Int32(%C16class_resilience26ClassWithResilientProperty*)
@@ -139,24 +121,6 @@ public class MyResilientChild : MyResilientParent {
139121
// CHECK-NEXT: [[FIELD_VALUE:%.*]] = load i32, i32* [[FIELD_PAYLOAD]]
140122
// CHECK-NEXT: ret i32 [[FIELD_VALUE]]
141123

142-
143-
// ClassWithResilientlySizedProperty metadata accessor
144-
145-
// CHECK-LABEL: define %swift.type* @_TMaC16class_resilience33ClassWithResilientlySizedProperty()
146-
// CHECK: [[CACHE:%.*]] = load %swift.type*, %swift.type** @_TMLC16class_resilience33ClassWithResilientlySizedProperty
147-
// CHECK-NEXT: [[COND:%.*]] = icmp eq %swift.type* [[CACHE]], null
148-
// CHECK-NEXT: br i1 [[COND]], label %cacheIsNull, label %cont
149-
150-
// CHECK: cacheIsNull:
151-
// CHECK-NEXT: [[METADATA:%.*]] = call %swift.type* @swift_getResilientMetadata(
152-
// CHECK-NEXT: store %swift.type* [[METADATA]], %swift.type** @_TMLC16class_resilience33ClassWithResilientlySizedProperty
153-
// CHECK-NEXT: br label %cont
154-
155-
// CHECK: cont:
156-
// CHECK-NEXT: [[RESULT:%.*]] = phi %swift.type* [ [[CACHE]], %entry ], [ [[METADATA]], %cacheIsNull ]
157-
// CHECK-NEXT: ret %swift.type* [[RESULT]]
158-
159-
160124
// ClassWithResilientlySizedProperty.color getter
161125

162126
// CHECK-LABEL: define i32 @_TFC16class_resilience33ClassWithResilientlySizedPropertyg5colorVs5Int32(%C16class_resilience33ClassWithResilientlySizedProperty*)
@@ -168,7 +132,6 @@ public class MyResilientChild : MyResilientParent {
168132
// CHECK-NEXT: [[FIELD_VALUE:%.*]] = load i32, i32* [[FIELD_PAYLOAD]]
169133
// CHECK-NEXT: ret i32 [[FIELD_VALUE]]
170134

171-
172135
// ClassWithIndirectResilientEnum.color getter
173136

174137
// CHECK-LABEL: define i32 @_TFC16class_resilience30ClassWithIndirectResilientEnumg5colorVs5Int32(%C16class_resilience30ClassWithIndirectResilientEnum*)
@@ -177,7 +140,6 @@ public class MyResilientChild : MyResilientParent {
177140
// CHECK-NEXT: [[FIELD_VALUE:%.*]] = load i32, i32* [[FIELD_PAYLOAD]]
178141
// CHECK-NEXT: ret i32 [[FIELD_VALUE]]
179142

180-
181143
// ResilientChild.field getter
182144

183145
// CHECK-LABEL: define i32 @_TFC16class_resilience14ResilientChildg5fieldVs5Int32(%C16class_resilience14ResilientChild*)
@@ -189,7 +151,6 @@ public class MyResilientChild : MyResilientParent {
189151
// CHECK-NEXT: [[FIELD_VALUE:%.*]] = load i32, i32* [[FIELD_PAYLOAD]]
190152
// CHECK-NEXT: ret i32 [[FIELD_VALUE]]
191153

192-
193154
// ResilientGenericChild.field getter
194155

195156

@@ -214,7 +175,6 @@ public class MyResilientChild : MyResilientParent {
214175
// CHECK-NEXT: [[RESULT:%.*]] = load i32, i32* [[PAYLOAD_ADDR]]
215176
// CHECK-NEXT: ret i32 [[RESULT]]
216177

217-
218178
// MyResilientChild.field getter
219179

220180
// CHECK-LABEL: define i32 @_TFC16class_resilience16MyResilientChildg5fieldVs5Int32(%C16class_resilience16MyResilientChild*)
@@ -223,6 +183,37 @@ public class MyResilientChild : MyResilientParent {
223183
// CHECK-NEXT: [[RESULT:%.*]] = load i32, i32* [[PAYLOAD_ADDR]]
224184
// CHECK-NEXT: ret i32 [[RESULT]]
225185

186+
// ClassWithResilientProperty metadata accessor
187+
188+
// CHECK-LABEL: define %swift.type* @_TMaC16class_resilience26ClassWithResilientProperty()
189+
// CHECK: [[CACHE:%.*]] = load %swift.type*, %swift.type** @_TMLC16class_resilience26ClassWithResilientProperty
190+
// CHECK-NEXT: [[COND:%.*]] = icmp eq %swift.type* [[CACHE]], null
191+
// CHECK-NEXT: br i1 [[COND]], label %cacheIsNull, label %cont
192+
193+
// CHECK: cacheIsNull:
194+
// CHECK-NEXT: [[METADATA:%.*]] = call %swift.type* @swift_getResilientMetadata(
195+
// CHECK-NEXT: store %swift.type* [[METADATA]], %swift.type** @_TMLC16class_resilience26ClassWithResilientProperty
196+
// CHECK-NEXT: br label %cont
197+
198+
// CHECK: cont:
199+
// CHECK-NEXT: [[RESULT:%.*]] = phi %swift.type* [ [[CACHE]], %entry ], [ [[METADATA]], %cacheIsNull ]
200+
// CHECK-NEXT: ret %swift.type* [[RESULT]]
201+
202+
// ClassWithResilientlySizedProperty metadata accessor
203+
204+
// CHECK-LABEL: define %swift.type* @_TMaC16class_resilience33ClassWithResilientlySizedProperty()
205+
// CHECK: [[CACHE:%.*]] = load %swift.type*, %swift.type** @_TMLC16class_resilience33ClassWithResilientlySizedProperty
206+
// CHECK-NEXT: [[COND:%.*]] = icmp eq %swift.type* [[CACHE]], null
207+
// CHECK-NEXT: br i1 [[COND]], label %cacheIsNull, label %cont
208+
209+
// CHECK: cacheIsNull:
210+
// CHECK-NEXT: [[METADATA:%.*]] = call %swift.type* @swift_getResilientMetadata(
211+
// CHECK-NEXT: store %swift.type* [[METADATA]], %swift.type** @_TMLC16class_resilience33ClassWithResilientlySizedProperty
212+
// CHECK-NEXT: br label %cont
213+
214+
// CHECK: cont:
215+
// CHECK-NEXT: [[RESULT:%.*]] = phi %swift.type* [ [[CACHE]], %entry ], [ [[METADATA]], %cacheIsNull ]
216+
// CHECK-NEXT: ret %swift.type* [[RESULT]]
226217

227218
// ClassWithResilientProperty metadata instantiation function
228219

@@ -241,7 +232,6 @@ public class MyResilientChild : MyResilientParent {
241232
// CHECK-native-NEXT: store [[INT]] [[FIELD_OFFSET]], [[INT]]* @_TWvdvC16class_resilience26ClassWithResilientProperty5colorVs5Int32
242233
// CHECK: ret %swift.type* [[METADATA]]
243234

244-
245235
// ClassWithResilientlySizedProperty metadata instantiation function
246236

247237
// CHECK-LABEL: define private %swift.type* @create_generic_metadata_ClassWithResilientlySizedProperty(%swift.type_pattern*, i8**)

test/IRGen/closure.swift

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,24 @@ func b<T : Ordinable>(seq seq: T) -> (Int) -> Int {
2121
return { i in i + seq.ord() }
2222
}
2323

24+
// -- Closure entry point
25+
// CHECK: define linkonce_odr hidden i64 @[[CLOSURE2:_TFF7closure1buRxS_9OrdinablerFT3seqx_FSiSiU_FSiSi]](i64, %swift.refcounted*, %swift.type* %T, i8** %T.Ordinable) {{.*}} {
26+
27+
// -- <rdar://problem/14443343> Boxing of tuples with generic elements
28+
// CHECK: define hidden { i8*, %swift.refcounted* } @_TF7closure14captures_tupleu0_rFT1xTxq___FT_Txq__(%swift.opaque* noalias nocapture, %swift.opaque* noalias nocapture, %swift.type* %T, %swift.type* %U)
29+
func captures_tuple<T, U>(x x: (T, U)) -> () -> (T, U) {
30+
// CHECK: [[METADATA:%.*]] = call %swift.type* @swift_getTupleTypeMetadata2(%swift.type* %T, %swift.type* %U, i8* null, i8** null)
31+
// CHECK-NOT: @swift_getTupleTypeMetadata2
32+
// CHECK: [[BOX:%.*]] = call { %swift.refcounted*, %swift.opaque* } @swift_allocBox(%swift.type* [[METADATA]])
33+
// CHECK: [[ADDR:%.*]] = extractvalue { %swift.refcounted*, %swift.opaque* } [[BOX]], 1
34+
// CHECK: bitcast %swift.opaque* [[ADDR]] to <{}>*
35+
return {x}
36+
}
37+
2438
// -- partial_apply stub
2539
// CHECK: define internal i64 @_TPA_[[CLOSURE1]](i64, %swift.refcounted*) {{.*}} {
2640
// CHECK: }
2741

28-
// -- Closure entry point
29-
// CHECK: define linkonce_odr hidden i64 @[[CLOSURE2:_TFF7closure1buRxS_9OrdinablerFT3seqx_FSiSiU_FSiSi]](i64, %swift.refcounted*, %swift.type* %T, i8** %T.Ordinable) {{.*}} {
30-
3142
// -- partial_apply stub
3243
// CHECK: define internal i64 @_TPA_[[CLOSURE2]](i64, %swift.refcounted*) {{.*}} {
3344
// CHECK: entry:
@@ -46,13 +57,4 @@ func b<T : Ordinable>(seq seq: T) -> (Int) -> Int {
4657
// CHECK: ret i64 [[RES]]
4758
// CHECK: }
4859

49-
// -- <rdar://problem/14443343> Boxing of tuples with generic elements
50-
// CHECK: define hidden { i8*, %swift.refcounted* } @_TF7closure14captures_tupleu0_rFT1xTxq___FT_Txq__(%swift.opaque* noalias nocapture, %swift.opaque* noalias nocapture, %swift.type* %T, %swift.type* %U)
51-
func captures_tuple<T, U>(x x: (T, U)) -> () -> (T, U) {
52-
// CHECK: [[METADATA:%.*]] = call %swift.type* @swift_getTupleTypeMetadata2(%swift.type* %T, %swift.type* %U, i8* null, i8** null)
53-
// CHECK-NOT: @swift_getTupleTypeMetadata2
54-
// CHECK: [[BOX:%.*]] = call { %swift.refcounted*, %swift.opaque* } @swift_allocBox(%swift.type* [[METADATA]])
55-
// CHECK: [[ADDR:%.*]] = extractvalue { %swift.refcounted*, %swift.opaque* } [[BOX]], 1
56-
// CHECK: bitcast %swift.opaque* [[ADDR]] to <{}>*
57-
return {x}
58-
}
60+

test/IRGen/dynamic_self_metadata.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// FIXME: Not a SIL test because we can't parse dynamic Self in SIL.
66
// <rdar://problem/16931299>
77

8+
// CHECK: [[TYPE:%.+]] = type <{ [8 x i8] }>
89
// CHECK: [[TYPE:%.+]] = type <{ [8 x i8] }>
910

1011
@inline(never) func id<T>(t: T) -> T {

test/IRGen/enum_resilience.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,13 @@ public func resilientEnumPartialApply(f: Medium -> Int) {
200200
// CHECK: ret void
201201
}
202202

203+
// Make sure we call a function to access metadata of enums with
204+
// resilient layout.
205+
206+
// CHECK-LABEL: define %swift.type* @_TF15enum_resilience20getResilientEnumTypeFT_PMP_()
207+
// CHECK: [[METADATA:%.*]] = call %swift.type* @_TMaO15enum_resilience24EnumWithResilientPayload()
208+
// CHECK-NEXT: ret %swift.type* [[METADATA]]
209+
203210
// CHECK-LABEL: define internal void @_TPA__TTRXFo_iO14resilient_enum6Medium_dSi_XFo_iS0__iSi_(%Si* noalias nocapture sret, %swift.opaque* noalias nocapture, %swift.refcounted*)
204211

205212

@@ -211,13 +218,6 @@ public enum EnumWithResilientPayload {
211218
case TwoSizes(Size, Size)
212219
}
213220

214-
// Make sure we call a function to access metadata of enums with
215-
// resilient layout.
216-
217-
// CHECK-LABEL: define %swift.type* @_TF15enum_resilience20getResilientEnumTypeFT_PMP_()
218-
// CHECK: [[METADATA:%.*]] = call %swift.type* @_TMaO15enum_resilience24EnumWithResilientPayload()
219-
// CHECK-NEXT: ret %swift.type* [[METADATA]]
220-
221221
public func getResilientEnumType() -> Any.Type {
222222
return EnumWithResilientPayload.self
223223
}

0 commit comments

Comments
 (0)