diff options
author | Heejin Ahn <aheejin@gmail.com> | 2020-04-14 15:51:48 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-14 15:51:48 -0700 |
commit | 359525bc5c04798e394a6e0a48c40fbfed7366db (patch) | |
tree | 79f921c918d8df0268ff580dd5b35f67a8c229b8 /src | |
parent | ec76e9e8922a55b521c8b72ca970c7aee7b6d44a (diff) | |
download | binaryen-359525bc5c04798e394a6e0a48c40fbfed7366db.tar.gz binaryen-359525bc5c04798e394a6e0a48c40fbfed7366db.tar.bz2 binaryen-359525bc5c04798e394a6e0a48c40fbfed7366db.zip |
Note removal of catch body in Vacuum (#2765)
When it is certain that the try body does not throw, we can replace the
try-catch with the try body. But in this case we have to notify the type
updater that the catch body is removed, so that all parents' type should
be updated properly.
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/Vacuum.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/passes/Vacuum.cpp b/src/passes/Vacuum.cpp index 9b67a3a16..94537619c 100644 --- a/src/passes/Vacuum.cpp +++ b/src/passes/Vacuum.cpp @@ -423,6 +423,7 @@ struct Vacuum : public WalkerPass<ExpressionStackWalker<Vacuum>> { if (!EffectAnalyzer(getPassOptions(), getModule()->features, curr->body) .throws) { replaceCurrent(curr->body); + typeUpdater.noteRecursiveRemoval(curr->catchBody); } } |