[WebAssembly] Use function/global index space in WasmSymbol
authorSam Clegg <sbc@chromium.org>
Tue, 26 Sep 2017 18:21:12 +0000 (18:21 +0000)
committerSam Clegg <sbc@chromium.org>
Tue, 26 Sep 2017 18:21:12 +0000 (18:21 +0000)
commitafd34c6df76a68b581205a21733ceedf8676932d
treee81f19fd4fb611d77e25cc99a551762fbce2ba3d
parent9d10bdf6448f8971e5c893d23bcb7d933a0efce4
[WebAssembly] Use function/global index space in WasmSymbol

It is useful for the symbol to contain the index of the
function of global it represents in the function/global
index space.

For imports we also store the import index so that the
linker can find, for example, the signature of the
corresponding function, which is defined by the import

In the long run we need to decide whether this API
surface should be closer to binary (where imported
functions are seperate) or the wasm spec (where the
function index space is unified).

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

llvm-svn: 314230
llvm/include/llvm/Object/Wasm.h
llvm/lib/Object/WasmObjectFile.cpp