diff options
| author | Sam Clegg <sbc@chromium.org> | 2018-02-23 05:08:53 +0000 |
|---|---|---|
| committer | Sam Clegg <sbc@chromium.org> | 2018-02-23 05:08:53 +0000 |
| commit | 93102974386d5fe5ea217ec3d4aeda55395db4ff (patch) | |
| tree | 06f3eb15d4047c4949f48cc9f1cec2fdbda7e2e1 /lld/wasm/WriterUtils.cpp | |
| parent | 6c899ba6dee1a6cd1e1a49900bb5f3b6353a5487 (diff) | |
| download | bcm5719-llvm-93102974386d5fe5ea217ec3d4aeda55395db4ff.tar.gz bcm5719-llvm-93102974386d5fe5ea217ec3d4aeda55395db4ff.zip | |
[WebAssembly] Add explicit symbol table
This change modified lld to in response the llvm change which
moved to a more explicit symbol table in the object format.
Based on patches by Nicholas Wilson:
1. https://reviews.llvm.org/D41955
2. https://reviews.llvm.org/D42585
The primary difference that we see in the test output is that
for relocatable (-r) output we now have symbol table which
replaces exports/imports and globals.
See: https://github.com/WebAssembly/tool-conventions/issues/38
Differential Revision: https://reviews.llvm.org/D43264
llvm-svn: 325861
Diffstat (limited to 'lld/wasm/WriterUtils.cpp')
| -rw-r--r-- | lld/wasm/WriterUtils.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lld/wasm/WriterUtils.cpp b/lld/wasm/WriterUtils.cpp index c82a36abc19..0d3b5f0aca0 100644 --- a/lld/wasm/WriterUtils.cpp +++ b/lld/wasm/WriterUtils.cpp @@ -190,3 +190,10 @@ std::string lld::toString(const WasmSignature &Sig) { S += toString(static_cast<ValType>(Sig.ReturnType)); return S.str(); } + +std::string lld::toString(const WasmGlobalType &Sig) { + std::string S = toString(static_cast<ValType>(Sig.Type)); + if (Sig.Mutable) + return "mutable " + S; + return S; +} |

