diff options
author | Heejin Ahn <aheejin@gmail.com> | 2021-11-29 13:57:05 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-29 13:57:05 -0800 |
commit | 5f6911f1f1fcae058bf77720f04e1166bafca8e3 (patch) | |
tree | 64057fa15d525f52177bcd3a19fd9f9072531259 /src/ir/eh-utils.cpp | |
parent | 057df435a0b0cf707dc87bd6fec8dbdded697c58 (diff) | |
download | binaryen-5f6911f1f1fcae058bf77720f04e1166bafca8e3.tar.gz binaryen-5f6911f1f1fcae058bf77720f04e1166bafca8e3.tar.bz2 binaryen-5f6911f1f1fcae058bf77720f04e1166bafca8e3.zip |
Handle try in Flatten pass (#2567)
This adds handling of try in the Flatten pass.
Diffstat (limited to 'src/ir/eh-utils.cpp')
-rw-r--r-- | src/ir/eh-utils.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ir/eh-utils.cpp b/src/ir/eh-utils.cpp index ed7ec1e0a..31ddfe306 100644 --- a/src/ir/eh-utils.cpp +++ b/src/ir/eh-utils.cpp @@ -108,6 +108,10 @@ bool isPopValid(Expression* catchBody) { } void handleBlockNestedPops(Function* func, Module& wasm) { + if (!wasm.features.hasExceptionHandling()) { + return; + } + Builder builder(wasm); FindAll<Try> trys(func->body); for (auto* try_ : trys.list) { |