Skip to content
Commit 67abf539 authored by Sam Clegg's avatar Sam Clegg
Browse files

[WebAssembly] Don't duplicate functions in table output

Previously, we were ensuring that the "output index" for
InputFunctions was unique across all symbols that referenced
a function body, but allowing the same function body to have
multiple table indexes.

Now, we use the same mechanism for table indexes as we already
do for output indexes, ensuring that each InputFunction is only
placed in the table once.

This makes the LLD output table denser and smaller, but should
not change the behaviour.

Note that we still need the `Symbol::TableIndex` member, to
store the table index for function Symbols that don't have an
InputFunction, i.e. for address-taken imports.

Patch by Nicholas Wilson!

Differential Revision: https://reviews.llvm.org/D42476

llvm-svn: 323379
parent 48bbd63f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment