Skip to content

Commit a1b8826

Browse files
authored
Add explicit errors on unhandled instructions in Flatten (#6992)
This error makes #6989 less confusing.
1 parent cc40ed0 commit a1b8826

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/passes/Flatten.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,11 @@ struct Flatten
329329
}
330330
}
331331

332+
if (curr->is<BrOn>() || curr->is<TryTable>()) {
333+
Fatal() << "Unsupported instruction for Flatten: "
334+
<< getExpressionName(curr);
335+
}
336+
332337
// continue for general handling of everything, control flow or otherwise
333338
curr = getCurrent(); // we may have replaced it
334339
// we have changed children

0 commit comments

Comments
 (0)