diff options
author | Heejin Ahn <aheejin@gmail.com> | 2020-03-27 21:51:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-27 21:51:40 -0700 |
commit | 2b758fbdc46fc8fe5241bcf1ba5bbd81e6d556ed (patch) | |
tree | ad75a0205850e7c3fa7e1a561eb378267aa7e798 /src/dataflow/graph.h | |
parent | d595a45b66cbb4d59472d2954131ee1f4cf6ad8e (diff) | |
download | binaryen-2b758fbdc46fc8fe5241bcf1ba5bbd81e6d556ed.tar.gz binaryen-2b758fbdc46fc8fe5241bcf1ba5bbd81e6d556ed.tar.bz2 binaryen-2b758fbdc46fc8fe5241bcf1ba5bbd81e6d556ed.zip |
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.
Diffstat (limited to 'src/dataflow/graph.h')
-rw-r--r-- | src/dataflow/graph.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dataflow/graph.h b/src/dataflow/graph.h index 6a984ad72..114a38f11 100644 --- a/src/dataflow/graph.h +++ b/src/dataflow/graph.h @@ -230,6 +230,9 @@ struct Graph : public UnifiedExpressionVisitor<Graph, Node*> { return doVisitUnreachable(unreachable); } else if (auto* drop = curr->dynCast<Drop>()) { return doVisitDrop(drop); + } else if (curr->is<Try>() || curr->is<Throw>() || curr->is<Rethrow>() || + curr->is<BrOnExn>()) { + Fatal() << "DataFlow does not support EH instructions yet"; } else { return doVisitGeneric(curr); } |