summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wasm-s-parser.h7
-rw-r--r--src/wasm.h2
2 files changed, 2 insertions, 7 deletions
diff --git a/src/wasm-s-parser.h b/src/wasm-s-parser.h
index afcc8e2ec..719a6598b 100644
--- a/src/wasm-s-parser.h
+++ b/src/wasm-s-parser.h
@@ -923,12 +923,7 @@ private:
ret->targets.push_back(curr[1]->str());
}
Element& curr = *s[i];
- if (curr[0]->str() == CASE) {
- ret->default_ = curr[1]->str();
- } else {
- assert(curr[0]->str() == BR);
- assert(curr[1]->str() == ret->name);
- }
+ ret->default_ = curr[1]->str();
i++;
for (; i < s.size(); i++) {
Element& curr = *s[i];
diff --git a/src/wasm.h b/src/wasm.h
index 55cc75cf9..b1b8d84d4 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -474,7 +474,7 @@ public:
o << " (" << (caseNames.count(t) == 0 ? "br" : "case") << " " << (t.is() ? t : default_) << ")";
}
o << ")";
- if (default_.is()) o << " (case " << default_ << ")";
+ if (default_.is()) o << " (" << (caseNames.count(default_) == 0 ? "br" : "case") << " " << default_ << ")";
o << "\n";
for (auto& c : cases) {
doIndent(o, indent);