summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wasm.h b/src/wasm.h
index 5fd4ad53b..55cc75cf9 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -466,8 +466,12 @@ public:
incIndent(o, indent);
printFullLine(o, indent, value);
doIndent(o, indent) << "(table";
+ std::set<Name> caseNames;
+ for (auto& c : cases) {
+ caseNames.insert(c.name);
+ }
for (auto& t : targets) {
- o << " (case " << (t.is() ? t : default_) << ")";
+ o << " (" << (caseNames.count(t) == 0 ? "br" : "case") << " " << (t.is() ? t : default_) << ")";
}
o << ")";
if (default_.is()) o << " (case " << default_ << ")";