diff options
author | Wouter van Oortmerssen <aardappel@gmail.com> | 2019-01-03 22:59:59 +0000 |
---|---|---|
committer | Wouter van Oortmerssen <aardappel@gmail.com> | 2019-01-03 22:59:59 +0000 |
commit | 98432956087f564dd39fe8d76aa6bc5fc09e079b (patch) | |
tree | b351c997ff12ff3f06d4ab4ec3a9242c1b86f68a /llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h | |
parent | b8687c21682edf20e6a20df42f0d793901443e78 (diff) | |
download | bcm5719-llvm-98432956087f564dd39fe8d76aa6bc5fc09e079b.tar.gz bcm5719-llvm-98432956087f564dd39fe8d76aa6bc5fc09e079b.zip |
[WebAssembly] Made InstPrinter more robust
Summary:
Instead of asserting on certain kinds of malformed instructions, it
now still print, but instead adds an annotation indicating the
problem, and/or indicates invalid_type etc.
We're using the InstPrinter from many contexts that can't always
guarantee values are within range (e.g. the disassembler), where having
output is more valueable than asserting.
Reviewers: dschuff, aheejin
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D56223
llvm-svn: 350365
Diffstat (limited to 'llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h')
-rw-r--r-- | llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h b/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h index fd968bc9ea3..5ad45c7d5c7 100644 --- a/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h +++ b/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h @@ -56,7 +56,8 @@ public: namespace WebAssembly { -const char *TypeToString(wasm::ValType Ty); +const char *typeToString(wasm::ValType Ty); +const char *anyTypeToString(unsigned Ty); } // end namespace WebAssembly |