summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h
diff options
context:
space:
mode:
authorWouter van Oortmerssen <aardappel@gmail.com>2019-01-03 22:59:59 +0000
committerWouter van Oortmerssen <aardappel@gmail.com>2019-01-03 22:59:59 +0000
commit98432956087f564dd39fe8d76aa6bc5fc09e079b (patch)
treeb351c997ff12ff3f06d4ab4ec3a9242c1b86f68a /llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h
parentb8687c21682edf20e6a20df42f0d793901443e78 (diff)
downloadbcm5719-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.h3
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
OpenPOWER on IntegriCloud