diff options
author | Thomas Young <wenzhang5800@gmail.com> | 2021-06-27 00:05:04 +0800 |
---|---|---|
committer | Thomas Young <wenzhang5800@gmail.com> | 2021-06-27 01:08:22 +0800 |
commit | 6952f9871f74f60090fa311c709bf66c4bb3a3d9 (patch) | |
tree | 63059318133d2d806ac3928f3f76db8a5bc4f02b /gcc/rust | |
parent | 51d86210d3dcbbf4dea14149f90ad9087b006f6a (diff) | |
download | gcc-6952f9871f74f60090fa311c709bf66c4bb3a3d9.zip gcc-6952f9871f74f60090fa311c709bf66c4bb3a3d9.tar.gz gcc-6952f9871f74f60090fa311c709bf66c4bb3a3d9.tar.bz2 |
mark live symbol in break expr
Diffstat (limited to 'gcc/rust')
-rw-r--r-- | gcc/rust/lint/rust-lint-marklive.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/rust/lint/rust-lint-marklive.h b/gcc/rust/lint/rust-lint-marklive.h index 67dd76a..27dfe36 100644 --- a/gcc/rust/lint/rust-lint-marklive.h +++ b/gcc/rust/lint/rust-lint-marklive.h @@ -103,6 +103,17 @@ public: } } + void visit (HIR::LoopExpr &expr) override + { + expr.get_loop_block ()->accept_vis (*this); + } + + void visit (HIR::BreakExpr &expr) override + { + if (expr.has_break_expr ()) + expr.get_expr ()->accept_vis (*this); + } + void visit (HIR::Function &function) override { function.get_definition ().get ()->accept_vis (*this); |