diff options
author | Sam Clegg <sbc@chromium.org> | 2019-02-20 23:19:31 +0000 |
---|---|---|
committer | Sam Clegg <sbc@chromium.org> | 2019-02-20 23:19:31 +0000 |
commit | 6540e5700297b09269f2d3db61ad6487ee5f9030 (patch) | |
tree | 3195ac11eeb9660014056b5f57730b4cdff88850 /lld/wasm/Symbols.h | |
parent | 2d13dcacfb98881348bbe11920145edbb27d8166 (diff) | |
download | bcm5719-llvm-6540e5700297b09269f2d3db61ad6487ee5f9030.tar.gz bcm5719-llvm-6540e5700297b09269f2d3db61ad6487ee5f9030.zip |
[WebAssembly] Don't generate invalid modules when function signatures mismatch
Previously we could emit a warning and generate a potentially invalid
wasm module (due to call sites and functions having conflicting
signatures). Now, rather than create invalid binaries we handle such
cases by creating stub functions containing unreachable, effectively
turning these into runtime errors rather than validation failures.
Differential Revision: https://reviews.llvm.org/D57909
llvm-svn: 354528
Diffstat (limited to 'lld/wasm/Symbols.h')
-rw-r--r-- | lld/wasm/Symbols.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lld/wasm/Symbols.h b/lld/wasm/Symbols.h index fd501ed64cd..3ed9e7abf55 100644 --- a/lld/wasm/Symbols.h +++ b/lld/wasm/Symbols.h @@ -105,6 +105,8 @@ public: // True if this symbol is specified by --trace-symbol option. unsigned Traced : 1; + const WasmSignature* getSignature() const; + protected: Symbol(StringRef Name, Kind K, uint32_t Flags, InputFile *F) : IsUsedInRegularObj(false), ForceExport(false), Traced(false), |