Skip to content

Commit 259fcf3

Browse files
committed
Tests: Make some IRGen tests less deployment target dependent.
Resolves rdar://121344608
1 parent 4f443af commit 259fcf3

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

test/IRGen/casts.sil

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ entry(%n : $Builtin.NativeObject):
5252
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc { ptr, ptr } @u_cast_to_class_existential(ptr %0)
5353
// CHECK: call { ptr, ptr } @dynamic_cast_existential_1_unconditional(ptr {{%.*}}, ptr {{%.*}}, {{.*}} @"$s5casts2CPMp"
5454
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} linkonce_odr hidden { ptr, ptr } @dynamic_cast_existential_1_unconditional(ptr %0, ptr %1, ptr %2) {{.*}} {
55-
// CHECK: [[WITNESS:%.*]] = call ptr @swift_conformsToProtocol(ptr %1, ptr %2)
55+
// CHECK: [[WITNESS:%.*]] = call ptr @swift_conformsToProtocol{{(2)?}}(ptr %1, ptr %2)
5656
// CHECK: [[IS_NULL:%.*]] = icmp eq ptr [[WITNESS]], null
5757
// CHECK: br i1 [[IS_NULL]], label %fail, label %cont
5858
// CHECK: cont:
@@ -78,11 +78,11 @@ entry(%a : $@thick Any.Type):
7878
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc { ptr, ptr, ptr } @u_cast_to_class_existential_2(ptr %0)
7979
// CHECK: call { ptr, ptr, ptr } @dynamic_cast_existential_2_unconditional(ptr {{%.*}}, ptr {{%.*}}, {{.*}} @"$s5casts2CPMp"{{[^,]*}}, {{.*}} @"$s5casts3CP2Mp"
8080
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} linkonce_odr hidden { ptr, ptr, ptr } @dynamic_cast_existential_2_unconditional(ptr %0, ptr %1, ptr %2, ptr %3)
81-
// CHECK: [[WITNESS:%.*]] = call ptr @swift_conformsToProtocol(ptr %1, ptr %2)
81+
// CHECK: [[WITNESS:%.*]] = call ptr @swift_conformsToProtocol{{(2)?}}(ptr %1, ptr %2)
8282
// CHECK: [[IS_NULL:%.*]] = icmp eq ptr [[WITNESS]], null
8383
// CHECK: br i1 [[IS_NULL]], label %fail, label %cont
8484
// CHECK: cont:
85-
// CHECK: [[WITNESS:%.*]] = call ptr @swift_conformsToProtocol(ptr %1, ptr %3)
85+
// CHECK: [[WITNESS:%.*]] = call ptr @swift_conformsToProtocol{{(2)?}}(ptr %1, ptr %3)
8686
// CHECK: [[IS_NULL:%.*]] = icmp eq ptr [[WITNESS]], null
8787
// CHECK: br i1 [[IS_NULL]], label %fail, label %cont1
8888
// CHECK: cont1:
@@ -119,7 +119,7 @@ entry(%a : $@thick Any.Type):
119119
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc { ptr, ptr } @c_cast_to_class_existential(ptr %0)
120120
// CHECK: call { ptr, ptr } @dynamic_cast_existential_1_conditional(ptr {{.*}}, ptr %.Type, {{.*}} @"$s5casts2CPMp"
121121
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} linkonce_odr hidden { ptr, ptr } @dynamic_cast_existential_1_conditional(ptr %0, ptr %1, ptr %2)
122-
// CHECK: [[WITNESS:%.*]] = call ptr @swift_conformsToProtocol(ptr %1, ptr %2)
122+
// CHECK: [[WITNESS:%.*]] = call ptr @swift_conformsToProtocol{{(2)?}}(ptr %1, ptr %2)
123123
// CHECK: [[IS_NULL:%.*]] = icmp eq ptr [[WITNESS]], null
124124
// CHECK: br i1 [[IS_NULL]], label %fail, label %cont
125125
// CHECK: cont:
@@ -149,11 +149,11 @@ nay:
149149
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc { ptr, ptr, ptr } @c_cast_to_class_existential_2(ptr %0)
150150
// CHECK: call { ptr, ptr, ptr } @dynamic_cast_existential_2_conditional(ptr {{%.*}}, ptr {{%.*}}, {{.*}} @"$s5casts2CPMp"{{[^,]*}}, {{.*}} @"$s5casts3CP2Mp"
151151
// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} linkonce_odr hidden { ptr, ptr, ptr } @dynamic_cast_existential_2_conditional(ptr %0, ptr %1, ptr %2, ptr %3)
152-
// CHECK: [[WITNESS:%.*]] = call ptr @swift_conformsToProtocol(ptr %1, ptr %2)
152+
// CHECK: [[WITNESS:%.*]] = call ptr @swift_conformsToProtocol{{(2)?}}(ptr %1, ptr %2)
153153
// CHECK: [[IS_NULL:%.*]] = icmp eq ptr [[WITNESS]], null
154154
// CHECK: br i1 [[IS_NULL]], label %fail, label %cont
155155
// CHECK: cont:
156-
// CHECK: [[WITNESS:%.*]] = call ptr @swift_conformsToProtocol(ptr %1, ptr %3)
156+
// CHECK: [[WITNESS:%.*]] = call ptr @swift_conformsToProtocol{{(2)?}}(ptr %1, ptr %3)
157157
// CHECK: [[IS_NULL:%.*]] = icmp eq ptr [[WITNESS]], null
158158
// CHECK: br i1 [[IS_NULL]], label %fail, label %cont1
159159
// CHECK: cont1:

test/IRGen/objc_runtime_name_clang_attr.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir -import-objc-header %S/Inputs/objc_runtime_name_clang_attr.h %s | %FileCheck %s
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -disable-objective-c-protocol-symbolic-references -emit-ir -import-objc-header %S/Inputs/objc_runtime_name_clang_attr.h %s | %FileCheck %s
22
// REQUIRES: objc_interop
33

44
// Use the runtime name for runtime instantiation

test/IRGen/subclass_existentials.sil

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ bb0(%0 : @owned $C, %1 : @owned $C & P):
108108
// CHECK-NEXT: br i1 [[IS_SUBCLASS]], label %cont, label %fail
109109

110110
// CHECK: cont:
111-
// CHECK-NEXT: [[WTABLE:%.*]] = call ptr @swift_conformsToProtocol(ptr %1, {{.*}} %3)
111+
// CHECK-NEXT: [[WTABLE:%.*]] = call ptr @swift_conformsToProtocol{{(2)?}}(ptr %1, {{.*}} %3)
112112
// CHECK-NEXT: [[IS_NOT_CONFORMING:%.*]] = icmp eq ptr [[WTABLE]], null
113113
// CHECK-NEXT: br i1 [[IS_NOT_CONFORMING]], label %fail, label %cont1
114114

@@ -141,7 +141,7 @@ bb0(%0 : @owned $C):
141141

142142
// CHECK-LABEL: define linkonce_odr hidden { ptr, ptr } @dynamic_cast_existential_1_unconditional(ptr %0, ptr
143143
// CHECK: entry:
144-
// CHECK-NEXT: [[WTABLE:%.*]] = call ptr @swift_conformsToProtocol(ptr %1, {{.*}} %2)
144+
// CHECK-NEXT: [[WTABLE:%.*]] = call ptr @swift_conformsToProtocol{{(2)?}}(ptr %1, {{.*}} %2)
145145
// CHECK-NEXT: [[IS_NOT_CONFORMING:%.*]] = icmp eq ptr [[WTABLE]], null
146146
// CHECK-NEXT: br i1 [[IS_NOT_CONFORMING]], label %fail, label %cont
147147

0 commit comments

Comments
 (0)