summaryrefslogtreecommitdiff
path: root/src/passes
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes')
-rw-r--r--src/passes/Flatten.cpp5
-rw-r--r--src/passes/ReReloop.cpp3
2 files changed, 8 insertions, 0 deletions
diff --git a/src/passes/Flatten.cpp b/src/passes/Flatten.cpp
index 0a6a7022a..9139d5dca 100644
--- a/src/passes/Flatten.cpp
+++ b/src/passes/Flatten.cpp
@@ -68,6 +68,11 @@ struct Flatten
return;
}
+ if (curr->is<Try>() || curr->is<Throw>() || curr->is<Rethrow>() ||
+ curr->is<BrOnExn>()) {
+ Fatal() << "Flatten does not support EH instructions yet";
+ }
+
if (Properties::isControlFlowStructure(curr)) {
// handle control flow explicitly. our children do not have control flow,
// but they do have preludes which we need to set up in the right place
diff --git a/src/passes/ReReloop.cpp b/src/passes/ReReloop.cpp
index 8f83f8a8f..004e922ed 100644
--- a/src/passes/ReReloop.cpp
+++ b/src/passes/ReReloop.cpp
@@ -284,6 +284,9 @@ struct ReReloop final : public Pass {
ReturnTask::handle(*this, ret);
} else if (auto* un = curr->dynCast<Unreachable>()) {
UnreachableTask::handle(*this, un);
+ } else if (curr->is<Try>() || curr->is<Throw>() || curr->is<Rethrow>() ||
+ curr->is<BrOnExn>()) {
+ Fatal() << "ReReloop does not support EH instructions yet";
} else {
// not control flow, so just a simple element
getCurrBlock()->list.push_back(curr);