about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper
diff options
context:
space:
mode:
authorEric Holk <ericholk@microsoft.com>2022-01-25 16:13:07 -0800
committerEric Holk <ericholk@microsoft.com>2022-02-07 16:30:30 -0800
commitc37a906db56e5cd3699cdc385af9320615ca0064 (patch)
tree6489ef06f2ed62fa42381d5992f467978cffda7b /compiler/rustc_llvm/llvm-wrapper
parent29185844c48499278b4a713e9a40f1a6d0437eba (diff)
downloadrust-c37a906db56e5cd3699cdc385af9320615ca0064.tar.gz
rust-c37a906db56e5cd3699cdc385af9320615ca0064.zip
Drop tracking: improve break and continue handling
This commit fixes two issues.

One, sometimes break or continue have a block target instead of an
expression target. This seems to mainly happen with try blocks. Since
the drop tracking analysis only works on expressions, if we see a block
target for break or continue, we substitute the last expression of the
block as the target instead.

Two, break and continue were incorrectly being treated as the same, so
continue would also show up as an exit from the loop or block. This
patch corrects the way continue is handled by keeping a stack of loop
entry points and uses those to find the target of the continue.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
0 files changed, 0 insertions, 0 deletions