diff options
| author | Sam Clegg <sbc@chromium.org> | 2019-02-07 22:42:16 +0000 |
|---|---|---|
| committer | Sam Clegg <sbc@chromium.org> | 2019-02-07 22:42:16 +0000 |
| commit | 230dc11d24626c8a717de5073fef31ea8ea2683f (patch) | |
| tree | d6615c67263009ce81f191b15416fc5a68fe3cfe /lld/wasm/SymbolTable.h | |
| parent | 81f859d16940e7b7193c074ee03ff39a79dff901 (diff) | |
| download | bcm5719-llvm-230dc11d24626c8a717de5073fef31ea8ea2683f.tar.gz bcm5719-llvm-230dc11d24626c8a717de5073fef31ea8ea2683f.zip | |
[WebAssembly] Refactor handling of weak undefined functions. NFC.
Also add to the docs.
This is refactor in preparation for https://reviews.llvm.org/D57909
Differential Revision: https://reviews.llvm.org/D57920
llvm-svn: 353478
Diffstat (limited to 'lld/wasm/SymbolTable.h')
| -rw-r--r-- | lld/wasm/SymbolTable.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lld/wasm/SymbolTable.h b/lld/wasm/SymbolTable.h index 67133cee256..f03980d7066 100644 --- a/lld/wasm/SymbolTable.h +++ b/lld/wasm/SymbolTable.h @@ -79,10 +79,15 @@ public: DefinedFunction *addSyntheticFunction(StringRef Name, uint32_t Flags, InputFunction *Function); + void handleWeakUndefines(); + private: - std::pair<Symbol *, bool> insert(StringRef Name, InputFile *File); + std::pair<Symbol *, bool> insert(StringRef Name, const InputFile *File); std::pair<Symbol *, bool> insertName(StringRef Name); + InputFunction *replaceWithUnreachable(Symbol *Sym, const WasmSignature &Sig, + StringRef DebugName); + // Maps symbol names to index into the SymVector. -1 means that symbols // is to not yet in the vector but it should have tracing enabled if it is // ever added. |

