]> git.lizzy.rs Git - rust.git/commit
fix translation of terminators in MSVC cleanup blocks
authorAriel Ben-Yehuda <ariel.byd@gmail.com>
Sun, 29 May 2016 19:01:06 +0000 (22:01 +0300)
committerAriel Ben-Yehuda <ariel.byd@gmail.com>
Sat, 4 Jun 2016 10:26:32 +0000 (13:26 +0300)
commit1ae7ae0c1c7ed68c616273f245647afa47f3cbde
tree86db461d0a98eb58db416248a96b42ede0d86798
parent506086ef9661e124280d46673b3ed93be6461ae8
fix translation of terminators in MSVC cleanup blocks

MSVC requires unwinding code to be split to a tree of *funclets*, where each funclet
can only branch to itself or to to its parent.

Luckily, the code we generates matches this pattern. Recover that structure in
an analyze pass and translate according to that.
src/librustc_borrowck/borrowck/mir/elaborate_drops.rs
src/librustc_trans/common.rs
src/librustc_trans/mir/analyze.rs
src/librustc_trans/mir/block.rs
src/librustc_trans/mir/mod.rs
src/test/run-fail/issue-30380.rs
src/test/run-pass/dynamic-drop.rs