@@ -8,22 +8,22 @@ public func getCounter() -> CInt {
88
99// CHECK: @{{counter|"\?counter@@3HA"}} = external {{(dso_local )?}}global i32, align 4
1010
11- // CHECK: define {{protected|dllexport}} swiftcc i32 @"$s4main10getCounters5Int32VyF"() #0
11+ // CHECK: define {{( protected |dllexport )?}} swiftcc i32 @"$s4main10getCounters5Int32VyF"() #0
1212// CHECK: [[LOAD:%.*]] = load i32, i32* getelementptr inbounds (%Ts5Int32V, %Ts5Int32V* bitcast (i32* @{{counter|"\?counter@@3HA"}} to %Ts5Int32V*), i32 0, i32 0), align 4
1313// CHECK: ret i32 [[LOAD]]
1414
1515public func setCounter( _ c: CInt ) {
1616 counter = c
1717}
1818
19- // CHECK: define {{protected|dllexport}} swiftcc void @"$s4main10setCounteryys5Int32VF"(i32 %0) #0
19+ // CHECK: define {{( protected |dllexport )?}} swiftcc void @"$s4main10setCounteryys5Int32VF"(i32 %0) #0
2020// CHECK: store i32 %0, i32* getelementptr inbounds (%Ts5Int32V, %Ts5Int32V* bitcast (i32* @{{counter|"\?counter@@3HA"}} to %Ts5Int32V*), i32 0, i32 0), align 4
2121
2222public func getNamespacedCounter( ) -> CInt {
2323 return Namespaced . counter
2424}
2525
26- // CHECK: define {{protected|dllexport}} swiftcc i32 @"$s4main20getNamespacedCounters5Int32VyF"() #0
26+ // CHECK: define {{( protected |dllexport )?}} swiftcc i32 @"$s4main20getNamespacedCounters5Int32VyF"() #0
2727//FIXME mangle non-top-level var names to prevent name collisions and check:
2828// load i32, i32* getelementptr inbounds (%Ts5Int32V, %Ts5Int32V* bitcast (i32* @Namespaced.counter to %Ts5Int32V*), i32 0, i32 0), align 4
2929// CHECK: ret i32 %1
@@ -32,7 +32,7 @@ public func setNamespacedCounter(_ c: CInt) {
3232 Namespaced . counter = c
3333}
3434
35- // CHECK: define {{protected|dllexport}} swiftcc void @"$s4main20setNamespacedCounteryys5Int32VF"(i32 %0) #0
35+ // CHECK: define {{( protected |dllexport )?}} swiftcc void @"$s4main20setNamespacedCounteryys5Int32VF"(i32 %0) #0
3636//FIXME mangle non-top-level var names to prevent name collisions and check:
3737// store i32 %0, i32* getelementptr inbounds (%Ts5Int32V, %Ts5Int32V* bitcast (i32* @Namespaced.counter to %Ts5Int32V*), i32 0, i32 0), align 4
3838
@@ -44,6 +44,6 @@ public func passingVarAsInout() {
4444 modifyInout ( & counter)
4545}
4646
47- // CHECK: define {{protected|dllexport}} swiftcc void @"$s4main17passingVarAsInoutyyF"() #0
47+ // CHECK: define {{( protected |dllexport )?}} swiftcc void @"$s4main17passingVarAsInoutyyF"() #0
4848// CHECK: call swiftcc void @"$s4main11modifyInoutyys5Int32VzF"(%Ts5Int32V* nocapture dereferenceable(4) bitcast (i32* @{{counter|"\?counter@@3HA"}} to %Ts5Int32V*))
4949
0 commit comments