[lld][WebAssembly] Fix crash on function signature mismatch with --relocatable
authorSam Clegg <sbc@chromium.org>
Fri, 24 Apr 2020 00:57:00 +0000 (17:57 -0700)
committerSam Clegg <sbc@chromium.org>
Sat, 25 Apr 2020 17:26:11 +0000 (10:26 -0700)
commit4b8e2d8e81adf3aa1ea79fe0b908100c4ea69f65
treed514651a5474a80a203b3d9c6602c7e4293d0563
parent6fb80d9383e415c35204b62569972f70ae7dcb0a
[lld][WebAssembly] Fix crash on function signature mismatch with --relocatable

These stub new function were not being added to the symbol table
which in turn meant that we were crashing when trying to output
relocations against them.

Differential Revision: https://reviews.llvm.org/D78779
lld/test/wasm/signature-mismatch.ll
lld/wasm/SymbolTable.cpp