From 2b758fbdc46fc8fe5241bcf1ba5bbd81e6d556ed Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Fri, 27 Mar 2020 21:51:40 -0700 Subject: Error out when EH is used in unsupported code (#2713) This calls `Fatal()` when EH instructions are used in unsupported code. Currently EH instructions are unsupported in Flatten, ReReloop, and DataFlow-using passes. --- src/passes/Flatten.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/passes/Flatten.cpp') 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() || curr->is() || curr->is() || + curr->is()) { + 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 -- cgit v1.2.3