summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2020-06-02 00:01:58 -0700
committerGitHub <noreply@github.com>2020-06-02 00:01:58 -0700
commit1b8942ce72a25e1e3d63128660d76b5ecde8acfb (patch)
tree849b61c83958da0782417653949c6da51e0250b0 /src
parent65d495f50a8e804c2d38505201ef5afc448dab86 (diff)
downloadbinaryen-1b8942ce72a25e1e3d63128660d76b5ecde8acfb.tar.gz
binaryen-1b8942ce72a25e1e3d63128660d76b5ecde8acfb.tar.bz2
binaryen-1b8942ce72a25e1e3d63128660d76b5ecde8acfb.zip
Fix SideEffect::Branches to only represent branches (#2886)
After #2783 `SideEffects::Branches` includes possibly throwing expressions, which can be calls (when EH is enabled). This changes `SideEffects::Branches` back to only include branches, returns, and infinite loops as it was before #2783.
Diffstat (limited to 'src')
-rw-r--r--src/ir/effects.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ir/effects.h b/src/ir/effects.h
index ff641e4d9..d2afc8133 100644
--- a/src/ir/effects.h
+++ b/src/ir/effects.h
@@ -504,7 +504,7 @@ struct EffectAnalyzer
};
uint32_t getSideEffects() const {
uint32_t effects = 0;
- if (transfersControlFlow()) {
+ if (branchesOut || hasExternalBreakTargets()) {
effects |= SideEffects::Branches;
}
if (calls) {