Skip to content

Commit 8b4ce2c

Browse files
[wasm][test] Remove unused argc/argv parameters from @main decl
In WebAssembly, `main` function is mangled differently depending on if it takes argc/argv or not. If it doesn't take them, it's mangled to `main` as well as other platforms, so remove unused argc/argv in executable tests to avoid linkage failure.
1 parent bfb36e4 commit 8b4ce2c

File tree

38 files changed

+38
-76
lines changed

38 files changed

+38
-76
lines changed

test/IRGen/async/run-call-classinstance-int64-to-void.sil

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ bb0(%0 :$@async @callee_guaranteed () -> ()):
112112
}
113113

114114
// main
115-
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
116-
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
115+
sil @main : $@convention(c) () -> Int32 {
117116
%test_case_nothrow = function_ref @test_case : $@convention(thin) @async () -> ()
118117
%thick_test_case = thin_to_thick_function %test_case_nothrow : $@convention(thin) @async () -> () to $@callee_guaranteed @async () -> ()
119118
%thunk = function_ref @no_throw_to_throw_think : $@convention(thin) @async (@guaranteed @async @callee_guaranteed () -> ()) -> @error Error

test/IRGen/async/run-call-classinstance-void-to-void.sil

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ bb0(%0 :$@async @callee_guaranteed () -> ()):
110110
}
111111

112112
// main
113-
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
114-
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
113+
sil @main : $@convention(c) () -> Int32 {
115114
%test_case_nothrow = function_ref @test_case : $@convention(thin) @async () -> ()
116115
%thick_test_case = thin_to_thick_function %test_case_nothrow : $@convention(thin) @async () -> () to $@callee_guaranteed @async () -> ()
117116
%thunk = function_ref @no_throw_to_throw_think : $@convention(thin) @async (@guaranteed @async @callee_guaranteed () -> ()) -> @error Error

test/IRGen/async/run-call-existential-to-void.sil

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ bb0(%0 :$@async @callee_guaranteed () -> ()):
8888
}
8989

9090
// main
91-
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
92-
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
91+
sil @main : $@convention(c) () -> Int32 {
9392
%test_case_nothrow = function_ref @test_case : $@convention(thin) @async () -> ()
9493
%thick_test_case = thin_to_thick_function %test_case_nothrow : $@convention(thin) @async () -> () to $@callee_guaranteed @async () -> ()
9594
%thunk = function_ref @no_throw_to_throw_think : $@convention(thin) @async (@guaranteed @async @callee_guaranteed () -> ()) -> @error Error

test/IRGen/async/run-call-generic-to-generic.sil

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ bb0(%0 :$@async @callee_guaranteed () -> ()):
6060
}
6161

6262
// main
63-
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
64-
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
63+
sil @main : $@convention(c) () -> Int32 {
6564
%test_case_nothrow = function_ref @test_case : $@convention(thin) @async () -> ()
6665
%thick_test_case = thin_to_thick_function %test_case_nothrow : $@convention(thin) @async () -> () to $@callee_guaranteed @async () -> ()
6766
%thunk = function_ref @no_throw_to_throw_think : $@convention(thin) @async (@guaranteed @async @callee_guaranteed () -> ()) -> @error Error

test/IRGen/async/run-call-genericEquatable-x2-to-bool.sil

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ bb0(%0 :$@async @callee_guaranteed () -> ()):
6767
}
6868

6969
// main
70-
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
71-
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
70+
sil @main : $@convention(c) () -> Int32 {
7271
%test_case_nothrow = function_ref @test_case : $@convention(thin) @async () -> ()
7372
%thick_test_case = thin_to_thick_function %test_case_nothrow : $@convention(thin) @async () -> () to $@callee_guaranteed @async () -> ()
7473
%thunk = function_ref @no_throw_to_throw_think : $@convention(thin) @async (@guaranteed @async @callee_guaranteed () -> ()) -> @error Error

test/IRGen/async/run-call-int64-and-int64-to-void.sil

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ bb0(%0 :$@async @callee_guaranteed () -> ()):
5353
}
5454

5555
// main
56-
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
57-
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
56+
sil @main : $@convention(c) () -> Int32 {
5857
%test_case_nothrow = function_ref @test_case : $@convention(thin) @async () -> ()
5958
%thick_test_case = thin_to_thick_function %test_case_nothrow : $@convention(thin) @async () -> () to $@callee_guaranteed @async () -> ()
6059
%thunk = function_ref @no_throw_to_throw_think : $@convention(thin) @async (@guaranteed @async @callee_guaranteed () -> ()) -> @error Error

test/IRGen/async/run-call-int64-to-void.sil

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ bb0(%0 :$@async @callee_guaranteed () -> ()):
5050
}
5151

5252
// main
53-
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
54-
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
53+
sil @main : $@convention(c) () -> Int32 {
5554
%test_case_nothrow = function_ref @test_case : $@convention(thin) @async () -> ()
5655
%thick_test_case = thin_to_thick_function %test_case_nothrow : $@convention(thin) @async () -> () to $@callee_guaranteed @async () -> ()
5756
%thunk = function_ref @no_throw_to_throw_think : $@convention(thin) @async (@guaranteed @async @callee_guaranteed () -> ()) -> @error Error

test/IRGen/async/run-call-protocolextension_instance-void-to-int64.sil

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ bb0(%0 :$@async @callee_guaranteed () -> ()):
8989
}
9090

9191
// main
92-
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
93-
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
92+
sil @main : $@convention(c) () -> Int32 {
9493
%test_case_nothrow = function_ref @test_case : $@convention(thin) @async () -> ()
9594
%thick_test_case = thin_to_thick_function %test_case_nothrow : $@convention(thin) @async () -> () to $@callee_guaranteed @async () -> ()
9695
%thunk = function_ref @no_throw_to_throw_think : $@convention(thin) @async (@guaranteed @async @callee_guaranteed () -> ()) -> @error Error

test/IRGen/async/run-call-protocolwitness_instance-void-to-int64.sil

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ bb0(%0 :$@async @callee_guaranteed () -> ()):
8080
}
8181

8282
// main
83-
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
84-
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
83+
sil @main : $@convention(c) () -> Int32 {
8584
%test_case_nothrow = function_ref @test_case : $@convention(thin) @async () -> ()
8685
%thick_test_case = thin_to_thick_function %test_case_nothrow : $@convention(thin) @async () -> () to $@callee_guaranteed @async () -> ()
8786
%thunk = function_ref @no_throw_to_throw_think : $@convention(thin) @async (@guaranteed @async @callee_guaranteed () -> ()) -> @error Error

test/IRGen/async/run-call-resilient-classinstance-void-to-void.sil

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ bb0(%0 :$@async @callee_guaranteed () -> ()):
4747
}
4848

4949
// main
50-
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
51-
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
50+
sil @main : $@convention(c) () -> Int32 {
5251
%test_case_nothrow = function_ref @test_case : $@convention(thin) @async () -> ()
5352
%thick_test_case = thin_to_thick_function %test_case_nothrow : $@convention(thin) @async () -> () to $@callee_guaranteed @async () -> ()
5453
%thunk = function_ref @no_throw_to_throw_think : $@convention(thin) @async (@guaranteed @async @callee_guaranteed () -> ()) -> @error Error

0 commit comments

Comments
 (0)