@@ -8,22 +8,22 @@ public func getCounter() -> CInt {
8
8
9
9
// CHECK: @{{counter|"\?counter@@3HA"}} = external {{(dso_local )?}}global i32, align 4
10
10
11
- // CHECK: define {{protected|dllexport}} swiftcc i32 @"$s4main10getCounters5Int32VyF"() #0
11
+ // CHECK: define {{( protected |dllexport )?}} swiftcc i32 @"$s4main10getCounters5Int32VyF"() #0
12
12
// CHECK: [[LOAD:%.*]] = load i32, i32* getelementptr inbounds (%Ts5Int32V, %Ts5Int32V* bitcast (i32* @{{counter|"\?counter@@3HA"}} to %Ts5Int32V*), i32 0, i32 0), align 4
13
13
// CHECK: ret i32 [[LOAD]]
14
14
15
15
public func setCounter( _ c: CInt ) {
16
16
counter = c
17
17
}
18
18
19
- // CHECK: define {{protected|dllexport}} swiftcc void @"$s4main10setCounteryys5Int32VF"(i32 %0) #0
19
+ // CHECK: define {{( protected |dllexport )?}} swiftcc void @"$s4main10setCounteryys5Int32VF"(i32 %0) #0
20
20
// CHECK: store i32 %0, i32* getelementptr inbounds (%Ts5Int32V, %Ts5Int32V* bitcast (i32* @{{counter|"\?counter@@3HA"}} to %Ts5Int32V*), i32 0, i32 0), align 4
21
21
22
22
public func getNamespacedCounter( ) -> CInt {
23
23
return Namespaced . counter
24
24
}
25
25
26
- // CHECK: define {{protected|dllexport}} swiftcc i32 @"$s4main20getNamespacedCounters5Int32VyF"() #0
26
+ // CHECK: define {{( protected |dllexport )?}} swiftcc i32 @"$s4main20getNamespacedCounters5Int32VyF"() #0
27
27
//FIXME mangle non-top-level var names to prevent name collisions and check:
28
28
// load i32, i32* getelementptr inbounds (%Ts5Int32V, %Ts5Int32V* bitcast (i32* @Namespaced.counter to %Ts5Int32V*), i32 0, i32 0), align 4
29
29
// CHECK: ret i32 %1
@@ -32,7 +32,7 @@ public func setNamespacedCounter(_ c: CInt) {
32
32
Namespaced . counter = c
33
33
}
34
34
35
- // CHECK: define {{protected|dllexport}} swiftcc void @"$s4main20setNamespacedCounteryys5Int32VF"(i32 %0) #0
35
+ // CHECK: define {{( protected |dllexport )?}} swiftcc void @"$s4main20setNamespacedCounteryys5Int32VF"(i32 %0) #0
36
36
//FIXME mangle non-top-level var names to prevent name collisions and check:
37
37
// store i32 %0, i32* getelementptr inbounds (%Ts5Int32V, %Ts5Int32V* bitcast (i32* @Namespaced.counter to %Ts5Int32V*), i32 0, i32 0), align 4
38
38
@@ -44,6 +44,6 @@ public func passingVarAsInout() {
44
44
modifyInout ( & counter)
45
45
}
46
46
47
- // CHECK: define {{protected|dllexport}} swiftcc void @"$s4main17passingVarAsInoutyyF"() #0
47
+ // CHECK: define {{( protected |dllexport )?}} swiftcc void @"$s4main17passingVarAsInoutyyF"() #0
48
48
// CHECK: call swiftcc void @"$s4main11modifyInoutyys5Int32VzF"(%Ts5Int32V* nocapture dereferenceable(4) bitcast (i32* @{{counter|"\?counter@@3HA"}} to %Ts5Int32V*))
49
49
0 commit comments