diff options
author | Alon Zakai <azakai@google.com> | 2021-01-27 19:40:08 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-27 11:40:08 -0800 |
commit | 5331e9d18b9359aa0e9d6e0df455883f62e46ea0 (patch) | |
tree | 7114cb1190a1a2c6c886b267092d613d74ad50b9 /src/wasm/wasm-emscripten.cpp | |
parent | 2bdc4841b680ee44e132bbb07f5167eaa7226f99 (diff) | |
download | binaryen-5331e9d18b9359aa0e9d6e0df455883f62e46ea0.tar.gz binaryen-5331e9d18b9359aa0e9d6e0df455883f62e46ea0.tar.bz2 binaryen-5331e9d18b9359aa0e9d6e0df455883f62e46ea0.zip |
Simplfy getExpressionName (#3522)
This used to return a simple name like "if" for an If, but it is redundant with
our proper printing logic. This PR turns it into a trivial helper that just prints
out the name of the class, so it now prints "If" with a capital. That is useful
for some logging, like in Metrics I think it is clearer than it was earlier (since
we are actually counting the classes, and our old emitting of text-format-like
names are just confusing, as we emitted "binary" there which is not valid).
Also replace some usages of that method with proper printing.
Diffstat (limited to 'src/wasm/wasm-emscripten.cpp')
-rw-r--r-- | src/wasm/wasm-emscripten.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wasm/wasm-emscripten.cpp b/src/wasm/wasm-emscripten.cpp index 2e3a5cf23..8f0d4f9c8 100644 --- a/src/wasm/wasm-emscripten.cpp +++ b/src/wasm/wasm-emscripten.cpp @@ -310,7 +310,7 @@ void AsmConstWalker::visitCall(Call* curr) { } } - Fatal() << "Unexpected arg0 type (" << getExpressionName(arg) + Fatal() << "Unexpected arg0 type (" << *arg << ") in call to: " << importName; } |