
Remove the `hasPrototype()` restriction so that old style K&R declarations of main work too. For example the following has 2 params but no prototype. ``` int main(argc, argv) int argc; char *argv[]; { return 0; } ``` Also, use `getNumParams()` over `param_size()` which seems to be a more direct way to get at the same information. Also, add missing tests for this mangling. Differential Revision: https://reviews.llvm.org/D127888
8 lines
206 B
C
8 lines
206 B
C
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=wasm32-unknown-unknown | FileCheck %s
|
|
|
|
int main(void) {
|
|
return 0;
|
|
}
|
|
// CHECK: @__main_void = hidden alias i32 (), ptr @main
|
|
// CHECK: define i32 @main() #0 {
|