Skip to content
Commit 78747bd3 authored by Sam Clegg's avatar Sam Clegg
Browse files

[clang][WebAssembly] Loosen restriction on `main` symbol mangling

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
parent b97b082c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment