Skip to content

Commit c0de9ac

Browse files
committed
test: enable more IRGen tests on Windows
This set of tests also pass on Windows now. These are mostly invocation adjustments or renaming/reordering that is needed.
1 parent 35c697c commit c0de9ac

20 files changed

+87
-85
lines changed

test/IRGen/autorelease.sil

+12-12
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,27 @@ sil @foo : $@convention(thin) (@owned C?) -> @autoreleased C? {
2424
bb0(%0 : $C?):
2525
return %0 : $C?
2626
}
27-
// x86_64: define{{( protected)?}} swiftcc i64 @foo(i64) {{.*}} {
27+
// x86_64: define{{( dllexport| protected)?}} swiftcc i64 @foo(i64) {{.*}} {
2828
// x86_64: [[T0:%.*]] = tail call i64 bitcast ([[OBJC]]* ([[OBJC]]*)* @objc_autoreleaseReturnValue to i64 (i64)*)(i64 %0)
2929
// x86_64-NEXT: ret i64 [[T0]]
3030

31-
// i386: define{{( protected)?}} swiftcc i32 @foo(i32) {{.*}} {
31+
// i386: define{{( dllexport| protected)?}} swiftcc i32 @foo(i32) {{.*}} {
3232
// i386: [[T0:%.*]] = tail call i32 bitcast ([[OBJC]]* ([[OBJC]]*)* @objc_autoreleaseReturnValue to i32 (i32)*)(i32 %0)
3333
// i386-NEXT: ret i32 [[T0]]
3434

35-
// arm64: define{{( protected)?}} swiftcc i64 @foo(i64) {{.*}} {
35+
// arm64: define{{( dllexport| protected)?}} swiftcc i64 @foo(i64) {{.*}} {
3636
// arm64: [[T0:%.*]] = tail call i64 bitcast ([[OBJC]]* ([[OBJC]]*)* @objc_autoreleaseReturnValue to i64 (i64)*)(i64 %0)
3737
// arm64-NEXT: ret i64 [[T0]]
3838

39-
// armv7: define{{( protected)?}} swiftcc i32 @foo(i32) {{.*}} {
39+
// armv7: define{{( dllexport| protected)?}} swiftcc i32 @foo(i32) {{.*}} {
4040
// armv7: [[T0:%.*]] = tail call i32 bitcast ([[OBJC]]* ([[OBJC]]*)* @objc_autoreleaseReturnValue to i32 (i32)*)(i32 %0)
4141
// armv7-NEXT: ret i32 [[T0]]
4242

43-
// armv7s: define{{( protected)?}} swiftcc i32 @foo(i32) {{.*}} {
43+
// armv7s: define{{( dllexport| protected)?}} swiftcc i32 @foo(i32) {{.*}} {
4444
// armv7s: [[T0:%.*]] = tail call i32 bitcast ([[OBJC]]* ([[OBJC]]*)* @objc_autoreleaseReturnValue to i32 (i32)*)(i32 %0)
4545
// armv7s-NEXT: ret i32 [[T0]]
4646

47-
// armv7k: define{{( protected)?}} swiftcc i32 @foo(i32) {{.*}} {
47+
// armv7k: define{{( dllexport| protected)?}} swiftcc i32 @foo(i32) {{.*}} {
4848
// armv7k: [[T0:%.*]] = tail call i32 bitcast ([[OBJC]]* ([[OBJC]]*)* @objc_autoreleaseReturnValue to i32 (i32)*)(i32 %0)
4949
// armv7k-NEXT: ret i32 [[T0]]
5050

@@ -54,45 +54,45 @@ bb0(%0 : $C?):
5454
%2 = apply %1(%0) : $@convention(thin) (@owned C?) -> @autoreleased C?
5555
return %2 : $C?
5656
}
57-
// x86_64: define{{( protected)?}} swiftcc i64 @bar(i64)
57+
// x86_64: define{{( dllexport| protected)?}} swiftcc i64 @bar(i64)
5858
// x86_64: [[T0:%.*]] = call swiftcc i64 @foo(i64 %0)
5959
// x86_64-NEXT: [[T1:%.*]] = inttoptr i64 [[T0]] to i8*
6060
// x86_64-NEXT: [[T2:%.*]] = notail call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
6161
// x86_64-NEXT: [[T3:%.*]] = ptrtoint i8* [[T2]] to i64
6262
// x86_64-NEXT: ret i64 [[T3]]
6363

64-
// i386: define{{( protected)?}} swiftcc i32 @bar(i32)
64+
// i386: define{{( dllexport| protected)?}} swiftcc i32 @bar(i32)
6565
// i386: [[T0:%.*]] = call swiftcc i32 @foo(i32 %0)
6666
// i386-NEXT: [[T1:%.*]] = inttoptr i32 [[T0]] to i8*
6767
// i386-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
6868
// i386-NEXT: [[T3:%.*]] = ptrtoint i8* [[T2]] to i32
6969
// i386-NEXT: ret i32 [[T3]]
7070

71-
// arm64: define{{( protected)?}} swiftcc i64 @bar(i64)
71+
// arm64: define{{( dllexport| protected)?}} swiftcc i64 @bar(i64)
7272
// arm64: [[T0:%.*]] = call swiftcc i64 @foo(i64 %0)
7373
// arm64-NEXT: call void asm sideeffect "mov
7474
// arm64-NEXT: [[T1:%.*]] = inttoptr i64 [[T0]] to i8*
7575
// arm64-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
7676
// arm64-NEXT: [[T3:%.*]] = ptrtoint i8* [[T2]] to i64
7777
// arm64-NEXT: ret i64 [[T3]]
7878

79-
// armv7: define{{( protected)?}} swiftcc i32 @bar(i32)
79+
// armv7: define{{( dllexport| protected)?}} swiftcc i32 @bar(i32)
8080
// armv7: [[T0:%.*]] = call swiftcc i32 @foo(i32 %0)
8181
// armv7-NEXT: call void asm sideeffect "mov
8282
// armv7-NEXT: [[T1:%.*]] = inttoptr i32 [[T0]] to i8*
8383
// armv7-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
8484
// armv7-NEXT: [[T3:%.*]] = ptrtoint i8* [[T2]] to i32
8585
// armv7-NEXT: ret i32 [[T3]]
8686

87-
// armv7s: define{{( protected)?}} swiftcc i32 @bar(i32)
87+
// armv7s: define{{( dllexport| protected)?}} swiftcc i32 @bar(i32)
8888
// armv7s: [[T0:%.*]] = call swiftcc i32 @foo(i32 %0)
8989
// armv7s-NEXT: call void asm sideeffect "mov
9090
// armv7s-NEXT: [[T1:%.*]] = inttoptr i32 [[T0]] to i8*
9191
// armv7s-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
9292
// armv7s-NEXT: [[T3:%.*]] = ptrtoint i8* [[T2]] to i32
9393
// armv7s-NEXT: ret i32 [[T3]]
9494

95-
// armv7k: define{{( protected)?}} swiftcc i32 @bar(i32)
95+
// armv7k: define{{( dllexport| protected)?}} swiftcc i32 @bar(i32)
9696
// armv7k: [[T0:%.*]] = call swiftcc i32 @foo(i32 %0)
9797
// armv7k-NEXT: call void asm sideeffect "mov
9898
// armv7k-NEXT: [[T1:%.*]] = inttoptr i32 [[T0]] to i8*

test/IRGen/c_functions.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
// CHECK-LABEL: define hidden swiftcc void @"$S11c_functions14testOverloadedyyF"
77
func testOverloaded() {
8-
// CHECK: call void @_Z10overloadedv()
8+
// CHECK: call void @{{_Z10overloadedv|"\\01\?overloaded@@\$\$J0YAXXZ"}}()
99
overloaded()
10-
// CHECK: call void @_Z10overloadedi(i32{{( signext)?}} 42)
10+
// CHECK: call void @{{_Z10overloadedi|"\\01\?overloaded@@\$\$J0YAXH@Z"}}(i32{{( signext)?}} 42)
1111
overloaded(42)
1212
// CHECK: call void @{{.*}}test_my_log
1313
test_my_log()
@@ -23,7 +23,7 @@ func test_indirect_by_val_alignment() {
2323
// x86_64: %indirect-temporary = alloca %TSo7a_thinga, align [[ALIGN:[0-9]+]]
2424
// x86_64: [[CAST:%.*]] = bitcast %TSo7a_thinga* %indirect-temporary to %struct.a_thing*
2525
// x86_64: call void @log_a_thing(%struct.a_thing* byval align [[ALIGN]] [[CAST]])
26-
// x86_64: define internal void @log_a_thing(%struct.a_thing* byval align [[ALIGN]]
26+
// x86_64: define internal void @log_a_thing(%struct.a_thing* {{(byval align [[ALIGN]])?}}
2727

2828
// aarch64: define hidden swiftcc void @"$S11c_functions30test_indirect_by_val_alignmentyyF"()
2929
// arm64: define hidden swiftcc void @"$S11c_functions30test_indirect_by_val_alignmentyyF"()

test/IRGen/c_globals.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/abi %s -emit-ir | %FileCheck %s
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/abi %s -emit-ir -Xcc -mno-omit-leaf-frame-pointer | %FileCheck %s
22

33
import c_layout
44

test/IRGen/clang_empty_type.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -emit-ir -verify -import-objc-header %S/Inputs/clang_empty_type.h %s
1+
// RUN: %target-swift-frontend -emit-ir -verify -enable-objc-interop -import-objc-header %S/Inputs/clang_empty_type.h %s
22

33
public func projectTrailingArray(x: inout TrailingArray) {
44
x.size = 2

test/IRGen/clang_inline_opt.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-swift-frontend -import-objc-header %S/Inputs/c_functions.h -primary-file %s -O -emit-ir -disable-llvm-optzns | %FileCheck %s
1+
// RUN: %target-swift-frontend -enable-objc-interop -import-objc-header %S/Inputs/c_functions.h -primary-file %s -O -emit-ir -disable-llvm-optzns | %FileCheck %s
22

33
func return10() -> UInt32 {
44
return return7() + 3

test/IRGen/multi_file_resilience.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// multi_module_resilience.
1212
// rdar://39763787
1313

14-
// CHECK-LABEL: define {{(protected )?}}swiftcc void @"$S4main7copyFoo3fooAA0C0VAE_tF"
14+
// CHECK-LABEL: define {{(dllexport |protected )?}}swiftcc void @"$S4main7copyFoo3fooAA0C0VAE_tF"
1515
// CHECK: [[T0:%.*]] = call swiftcc %swift.metadata_response @"$S4main3FooVMa"([[INT]] 0)
1616
// CHECK: [[METADATA:%.*]] = extractvalue %swift.metadata_response [[T0]], 0
1717
// CHECK: [[VWT:%.*]] = load i8**,

test/IRGen/multi_module_resilience.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import OtherModule
1717

18-
// CHECK-LABEL: define {{(protected )?}}swiftcc void @"$S4main7copyFoo3foo11OtherModule0C0VAF_tF"
18+
// CHECK-LABEL: define {{(dllexport |protected )?}}swiftcc void @"$S4main7copyFoo3foo11OtherModule0C0VAF_tF"
1919
// CHECK: [[T0:%.*]] = call swiftcc %swift.metadata_response @"$S11OtherModule3FooVMa"([[INT]] 0)
2020
// CHECK: [[METADATA:%.*]] = extractvalue %swift.metadata_response [[T0]], 0
2121
// CHECK: [[VWT:%.*]] = load i8**,
@@ -44,7 +44,7 @@ public func copyFoo(foo: Foo) -> Foo {
4444
return copy
4545
}
4646

47-
// CHECK-LABEL: define {{(protected )?}}swiftcc void @"$S4main7copyBar3bar11OtherModule0C0VAF_tF"
47+
// CHECK-LABEL: define {{(dllexport |protected )?}}swiftcc void @"$S4main7copyBar3bar11OtherModule0C0VAF_tF"
4848
// CHECK: [[T0:%.*]] = call swiftcc %swift.metadata_response @"$S11OtherModule3BarVMa"([[INT]] 0)
4949
// CHECK: [[METADATA:%.*]] = extractvalue %swift.metadata_response [[T0]], 0
5050
// CHECK: [[VWT:%.*]] = load i8**,

test/IRGen/protocol_conformance_records.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public struct NativeGenericType<T>: Runcible {
7575
// -- protocol descriptor
7676
// CHECK-SAME: [[RUNCIBLE]]
7777
// -- type metadata
78-
// CHECK-SAME: @"got.$SSiMn"
78+
// CHECK-SAME: @"{{got.|__imp_}}$SSiMn"
7979
// -- witness table
8080
// CHECK-SAME: @"$SSi28protocol_conformance_records8RuncibleAAWP"
8181
// -- reserved
@@ -91,7 +91,7 @@ extension Int: Runcible {
9191
// -- protocol descriptor
9292
// CHECK-SAME: [[RUNCIBLE]]
9393
// -- nominal type descriptor
94-
// CHECK-SAME: @"got.$S16resilient_struct4SizeVMn"
94+
// CHECK-SAME: @"{{got.|__imp_}}$S16resilient_struct4SizeVMn"
9595
// -- witness table
9696
// CHECK-SAME: @"$S16resilient_struct4SizeV28protocol_conformance_records8RuncibleADWP"
9797
// -- reserved
@@ -130,9 +130,9 @@ extension NativeGenericType : Spoon where T: Spoon {
130130
// Retroactive conformance
131131
// CHECK-LABEL: @"$SSi18resilient_protocol22OtherResilientProtocol0B20_conformance_recordsMc" ={{ dllexport | protected | }}constant
132132
// -- protocol descriptor
133-
// CHECK-SAME: @"got.$S18resilient_protocol22OtherResilientProtocolMp"
133+
// CHECK-SAME: @"{{got.|__imp_}}$S18resilient_protocol22OtherResilientProtocolMp"
134134
// -- nominal type descriptor
135-
// CHECK-SAME: @"got.$SSiMn"
135+
// CHECK-SAME: @"{{got.|__imp_}}$SSiMn"
136136
// -- witness table accessor
137137
// CHECK-SAME: @"$SSi18resilient_protocol22OtherResilientProtocol0B20_conformance_recordsWa"
138138
// -- flags

test/IRGen/protocol_resilience.sil

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import resilient_protocol
2525
// CHECK-SAME: i16 0,
2626

2727
// -- the protocol descriptor
28-
// CHECK-SAME: @"got.$S18resilient_protocol22OtherResilientProtocolMp"
28+
// CHECK-SAME: @"{{got.|__imp_}}$S18resilient_protocol22OtherResilientProtocolMp"
2929

3030
// -- the template
3131
// CHECK-SAME: @"$S19protocol_resilience23ResilientConformingTypeV010resilient_A005OtherC8ProtocolAAWp"
@@ -133,7 +133,7 @@ protocol InternalProtocol {
133133
// CHECK-SAME: i16 0,
134134

135135
// -- the protocol descriptor
136-
// CHECK-SAME: @"got.$S18resilient_protocol24ProtocolWithRequirementsMp"
136+
// CHECK-SAME: @"{{got.|__imp_}}$S18resilient_protocol24ProtocolWithRequirementsMp"
137137

138138
// -- the template
139139
// CHECK-SAME: @"$S19protocol_resilience24ConformsWithRequirementsV010resilient_A008ProtocoldE0AAWp"
@@ -151,10 +151,10 @@ protocol InternalProtocol {
151151

152152
// CHECK-SAME: internal constant {
153153

154-
// CHECK-SAME: @"got.$S18resilient_protocol24ProtocolWithRequirementsP5firstyyFTj"
154+
// CHECK-SAME: @"{{got.|__imp_}}$S18resilient_protocol24ProtocolWithRequirementsP5firstyyFTj"
155155
// CHECK-SAME: @firstWitness
156156

157-
// CHECK-SAME: @"got.$S18resilient_protocol24ProtocolWithRequirementsP6secondyyFTj"
157+
// CHECK-SAME: @"{{got.|__imp_}}$S18resilient_protocol24ProtocolWithRequirementsP6secondyyFTj"
158158
// CHECK-SAME: @secondWitness
159159

160160
// CHECK-SAME: }

test/IRGen/reflection_metadata.swift

+37-37
Original file line numberDiff line numberDiff line change
@@ -2,51 +2,51 @@
22
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -disable-reflection-names -emit-ir %s | %FileCheck %s --check-prefix=STRIP_REFLECTION_NAMES
33
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -disable-reflection-metadata -emit-ir %s | %FileCheck %s --check-prefix=STRIP_REFLECTION_METADATA
44

5-
// STRIP_REFLECTION_NAMES_DAG: {{.*}}swift5_reflect
6-
// STRIP_REFLECTION_NAMES_DAG: {{.*}}swift5_fieldmd
7-
// STRIP_REFLECTION_NAMES_DAG: {{.*}}swift5_assocty
8-
// STRIP_REFLECTION_NAMES-DAG: {{.*}}swift5_capture
9-
// STRIP_REFLECTION_NAMES-DAG: {{.*}}swift5_typeref
10-
// STRIP_REFLECTION_NAMES-NOT: {{.*}}swift5_reflstr
11-
// STRIP_REFLECTION_NAMES-NOT: {{.*}}swift5_builtin
5+
// STRIP_REFLECTION_NAMES_DAG: section "{{[^"]*swift5_reflect|.sw5rfst\$B}}
6+
// STRIP_REFLECTION_NAMES_DAG: section "{{[^"]*swift5_fieldmd|.sw5flmd\$B}}
7+
// STRIP_REFLECTION_NAMES_DAG: section "{{[^"]*swift5_assocty|.sw5asty\$B}}
8+
// STRIP_REFLECTION_NAMES-DAG: section "{{[^"]*swift5_capture|.sw5cptr\$B}}
9+
// STRIP_REFLECTION_NAMES-DAG: section "{{[^"]*swift5_typeref|.sw5tyrf\$B}}
10+
// STRIP_REFLECTION_NAMES-NOT: section "{{[^"]*swift5_reflstr|.sw5rfst\$B}}
11+
// STRIP_REFLECTION_NAMES-NOT: section "{{[^"]*swift5_builtin|.sw5bltn\$B}}
1212

1313
// STRIP_REFLECTION_NAMES-DAG: @"$S19reflection_metadata10MyProtocol_pMF" = internal constant {{.*}}swift5_fieldmd
1414

15-
// STRIP_REFLECTION_METADATA-NOT: {{.*}}swift5_reflect
16-
// STRIP_REFLECTION_METADATA-NOT: {{.*}}swift5_fieldmd
17-
// STRIP_REFLECTION_METADATA-NOT: {{.*}}swift5_assocty
18-
// STRIP_REFLECTION_METADATA-NOT: {{.*}}swift5_capture
19-
// STRIP_REFLECTION_METADATA-NOT: {{.*}}swift5_typeref
20-
// STRIP_REFLECTION_METADATA-NOT: {{.*}}swift5_reflstr
21-
// STRIP_REFLECTION_METADATA-NOT: {{.*}}swift5_builtin
15+
// STRIP_REFLECTION_METADATA-NOT: section "{{[^"]*swift5_reflect|.sw5rfst\$B}}
16+
// STRIP_REFLECTION_METADATA-NOT: section "{{[^"]*swift5_fieldmd|.sw5flmd\$B}}
17+
// STRIP_REFLECTION_METADATA-NOT: section "{{[^"]*swift5_assocty|.sw5asty\$B}}
18+
// STRIP_REFLECTION_METADATA-NOT: section "{{[^"]*swift5_capture|.sw5cptr\$B}}
19+
// STRIP_REFLECTION_METADATA-NOT: section "{{[^"]*swift5_typeref|.sw5tyrf\$B}}
20+
// STRIP_REFLECTION_METADATA-NOT: section "{{[^"]*swift5_reflstr|.sw5rfst\$B}}
21+
// STRIP_REFLECTION_METADATA-NOT: section "{{[^"]*swift5_builtin|.sw5bltn\$B}}
2222

2323
// CHECK-DAG: @__swift_reflection_version = linkonce_odr hidden constant i16 {{[0-9]+}}
24-
// CHECK-DAG: private constant [2 x i8] c"i\00", section "{{[^"]*}}swift5_reflstr{{[^"]*}}"
25-
// CHECK-DAG: private constant [3 x i8] c"ms\00", section "{{[^"]*}}swift5_reflstr{{[^"]*}}"
26-
// CHECK-DAG: private constant [3 x i8] c"me\00", section "{{[^"]*}}swift5_reflstr{{[^"]*}}"
27-
// CHECK-DAG: private constant [3 x i8] c"mc\00", section "{{[^"]*}}swift5_reflstr{{[^"]*}}"
28-
// CHECK-DAG: private constant [2 x i8] c"C\00", section "{{[^"]*}}swift5_reflstr{{[^"]*}}"
29-
// CHECK-DAG: private constant [2 x i8] c"S\00", section "{{[^"]*}}swift5_reflstr{{[^"]*}}"
30-
// CHECK-DAG: private constant [2 x i8] c"E\00", section "{{[^"]*}}swift5_reflstr{{[^"]*}}"
31-
// CHECK-DAG: private constant [2 x i8] c"I\00", section "{{[^"]*}}swift5_reflstr{{[^"]*}}"
32-
// CHECK-DAG: private constant [2 x i8] c"t\00", section "{{[^"]*}}swift5_reflstr{{[^"]*}}"
33-
// CHECK-DAG: private constant [4 x i8] c"mgs\00", section "{{[^"]*}}swift5_reflstr{{[^"]*}}"
34-
// CHECK-DAG: private constant [4 x i8] c"mge\00", section "{{[^"]*}}swift5_reflstr{{[^"]*}}"
35-
// CHECK-DAG: private constant [4 x i8] c"mgc\00", section "{{[^"]*}}swift5_reflstr{{[^"]*}}"
36-
// CHECK-DAG: private constant [3 x i8] c"GC\00", section "{{[^"]*}}swift5_reflstr{{[^"]*}}"
37-
// CHECK-DAG: private constant [3 x i8] c"GS\00", section "{{[^"]*}}swift5_reflstr{{[^"]*}}"
38-
// CHECK-DAG: private constant [3 x i8] c"GE\00", section "{{[^"]*}}swift5_reflstr{{[^"]*}}"
24+
// CHECK-DAG: private constant [2 x i8] c"i\00", section "{{[^"]*swift5_reflstr|.sw5rfst\$B}}
25+
// CHECK-DAG: private constant [3 x i8] c"ms\00", section "{{[^"]*swift5_reflstr|.sw5rfst\$B}}
26+
// CHECK-DAG: private constant [3 x i8] c"me\00", section "{{[^"]*swift5_reflstr|.sw5rfst\$B}}
27+
// CHECK-DAG: private constant [3 x i8] c"mc\00", section "{{[^"]*swift5_reflstr|.sw5rfst\$B}}
28+
// CHECK-DAG: private constant [2 x i8] c"C\00", section "{{[^"]*swift5_reflstr|.sw5rfst\$B}}
29+
// CHECK-DAG: private constant [2 x i8] c"S\00", section "{{[^"]*swift5_reflstr|.sw5rfst\$B}}
30+
// CHECK-DAG: private constant [2 x i8] c"E\00", section "{{[^"]*swift5_reflstr|.sw5rfst\$B}}
31+
// CHECK-DAG: private constant [2 x i8] c"I\00", section "{{[^"]*swift5_reflstr|.sw5rfst\$B}}
32+
// CHECK-DAG: private constant [2 x i8] c"t\00", section "{{[^"]*swift5_reflstr|.sw5rfst\$B}}
33+
// CHECK-DAG: private constant [4 x i8] c"mgs\00", section "{{[^"]*swift5_reflstr|.sw5rfst\$B}}
34+
// CHECK-DAG: private constant [4 x i8] c"mge\00", section "{{[^"]*swift5_reflstr|.sw5rfst\$B}}
35+
// CHECK-DAG: private constant [4 x i8] c"mgc\00", section "{{[^"]*swift5_reflstr|.sw5rfst\$B}}
36+
// CHECK-DAG: private constant [3 x i8] c"GC\00", section "{{[^"]*swift5_reflstr|.sw5rfst\$B}}
37+
// CHECK-DAG: private constant [3 x i8] c"GS\00", section "{{[^"]*swift5_reflstr|.sw5rfst\$B}}
38+
// CHECK-DAG: private constant [3 x i8] c"GE\00", section "{{[^"]*swift5_reflstr|.sw5rfst\$B}}
3939

4040
// CHECK-DAG: @"\01l__swift5_reflection_descriptor" = private constant { {{.*}} } { i32 1, i32 1, i32 2, {{.*}} }
4141

42-
// CHECK-DAG: @"$S19reflection_metadata10MyProtocol_pMF" = internal constant {{.*}}swift5_fieldmd
43-
// CHECK-DAG: @"$S19reflection_metadata7MyClassCMF" = internal constant {{.*}}swift5_fieldmd
44-
// CHECK-DAG: @"$S19reflection_metadata11ConformanceVAA10MyProtocolAAMA" = internal constant {{.*}}swift5_assocty
45-
// CHECK-DAG: @"$S19reflection_metadata8MyStructVMF" = internal constant {{.*}}swift5_fieldmd
46-
// CHECK-DAG: @"$S19reflection_metadata6MyEnumOMF" = internal constant {{.*}}swift5_fieldmd
47-
// CHECK-DAG: @"$S19reflection_metadata14MyGenericClassCMF" = internal constant {{.*}}swift5_fieldmd
48-
// CHECK-DAG: @"$S19reflection_metadata15MyGenericStructVMF" = internal constant {{.*}}swift5_fieldmd
49-
// CHECK-DAG: @"$S19reflection_metadata13MyGenericEnumOMF" = internal constant {{.*}}swift5_fieldmd
42+
// CHECK-DAG: @"$S19reflection_metadata10MyProtocol_pMF" = internal constant {{.*}} section "{{[^"]*swift5_fieldmd|.sw5flmd\$B}}
43+
// CHECK-DAG: @"$S19reflection_metadata7MyClassCMF" = internal constant {{.*}} section "{{[^"]*swift5_fieldmd|.sw5flmd\$B}}
44+
// CHECK-DAG: @"$S19reflection_metadata11ConformanceVAA10MyProtocolAAMA" = internal constant {{.*}} section "{{[^"]*swift5_assocty|.sw5asty\$B}}
45+
// CHECK-DAG: @"$S19reflection_metadata8MyStructVMF" = internal constant {{.*}} section "{{[^"]*swift5_fieldmd|.sw5flmd\$B}}
46+
// CHECK-DAG: @"$S19reflection_metadata6MyEnumOMF" = internal constant {{.*}} section "{{[^"]*swift5_fieldmd|.sw5flmd\$B}}
47+
// CHECK-DAG: @"$S19reflection_metadata14MyGenericClassCMF" = internal constant {{.*}} section "{{[^"]*swift5_fieldmd|.sw5flmd\$B}}
48+
// CHECK-DAG: @"$S19reflection_metadata15MyGenericStructVMF" = internal constant {{.*}} section "{{[^"]*swift5_fieldmd|.sw5flmd\$B}}
49+
// CHECK-DAG: @"$S19reflection_metadata13MyGenericEnumOMF" = internal constant {{.*}} section "{{[^"]*swift5_fieldmd|.sw5flmd\$B}}
5050

5151
public protocol MyProtocol {
5252
associatedtype Inner

test/IRGen/reflection_metadata_imported.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import c_layout
44

55
// CHECK-DAG: @__swift_reflection_version = linkonce_odr hidden constant i16 {{[0-9]+}}
66

7-
// CHECK-DAG: @"$S28reflection_metadata_imported15HasImportedTypeVMF" = internal constant {{.*}}swift5_fieldmd
8-
// CHECK-DAG: @"$SSo1AVMB" = linkonce_odr hidden constant {{.*}}swift5_builtin
9-
// CHECK-DAG: @"$SSo11CrappyColorVMB" = linkonce_odr hidden constant {{.*}}swift5_builtin
10-
// CHECK-DAG: @"$SSo11CrappyColorVs16RawRepresentableSCMA" = linkonce_odr hidden constant {{.*}}swift5_assocty
7+
// CHECK-DAG: @"$S28reflection_metadata_imported15HasImportedTypeVMF" = internal constant {{.*}}section "{{[^"]*swift5_fieldmd|.sw5flmd\$B}}
8+
// CHECK-DAG: @"$SSo1AVMB" = linkonce_odr hidden constant {{.*}}section "{{[^"]*swift5_builtin|.sw5bltn\$B}}
9+
// CHECK-DAG: @"$SSo11CrappyColorVMB" = linkonce_odr hidden constant {{.*}}section "{{[^"]*swift5_builtin|.sw5bltn\$B}}
10+
// CHECK-DAG: @"$SSo11CrappyColorVs16RawRepresentableSCMA" = linkonce_odr hidden constant {{.*}}section "{{[^"]*swift5_assocty|.sw5asty\$B}}
1111

1212
struct HasImportedType {
1313
let a: A

test/IRGen/resilience_bypass.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import second
88

9-
// CHECK: define{{( protected)?}} swiftcc [[INT]] @"$S17resilience_bypass7getSizeSiyF"() {{.*}} {
9+
// CHECK: define{{( dllexport| protected)?}} swiftcc [[INT]] @"$S17resilience_bypass7getSizeSiyF"() {{.*}} {
1010
// CHECK-NEXT: entry:
1111
// CHECK-NEXT: ret [[INT]] {{5|9}}
1212
// CHECK-NEXT: }

0 commit comments

Comments
 (0)