[WebAssembly] Teach lld how to demangle "__main_argc_argv".
authorDan Gohman <sunfish@mozilla.com>
Thu, 27 Feb 2020 15:51:37 +0000 (07:51 -0800)
committerDan Gohman <sunfish@mozilla.com>
Thu, 27 Feb 2020 15:55:01 +0000 (07:55 -0800)
commit197bda587b4bb5e7603ad05fc1106332edc6afbd
tree2de68607b7b331e046f57f14e8919fb996063591
parentc08384a3aeeb81646750543cd5637e096d6fc4b1
[WebAssembly] Teach lld how to demangle "__main_argc_argv".

WebAssembly requires that caller and callee signatures match, so it
can't do the usual trick of passing more arguments to main than it
expects. Instead WebAssembly will mangle "main" with argc/argv
parameters as "__main_argc_argv". This patch teaches lld how to
demangle it.

This patch is part of https://reviews.llvm.org/D70700.
lld/wasm/Symbols.cpp