diff options
author | Michael Bebenita <mbebenita@gmail.com> | 2016-05-06 11:10:46 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-05-06 11:10:46 -0700 |
commit | cff4b04d4306e0192c914c2a6281992e2610109c (patch) | |
tree | eaaff0074c4bbb376eea233ce030c4fc70b579a0 /src/ast_utils.h | |
parent | 07f0bad2540a6023ab7b0029b9532e1d44b41c03 (diff) | |
download | binaryen-cff4b04d4306e0192c914c2a6281992e2610109c.tar.gz binaryen-cff4b04d4306e0192c914c2a6281992e2610109c.tar.bz2 binaryen-cff4b04d4306e0192c914c2a6281992e2610109c.zip |
Fix BreakSeeker for switch default targets. (#447)
Diffstat (limited to 'src/ast_utils.h')
-rw-r--r-- | src/ast_utils.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ast_utils.h b/src/ast_utils.h index ebb6861da..e09104cc6 100644 --- a/src/ast_utils.h +++ b/src/ast_utils.h @@ -36,6 +36,7 @@ struct BreakSeeker : public PostWalker<BreakSeeker, Visitor<BreakSeeker>> { for (auto name : curr->targets) { if (name == target) found++; } + if (curr->default_ == target) found++; } static bool has(Expression* tree, Name target) { |