Skip to content

Commit 6548aef

Browse files
committed
fix loops in unwind code in MSVC
I'm not sure how well this works, but it's worth a try.
1 parent 5576770 commit 6548aef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc_trans/mir/analyze.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,9 @@ pub fn cleanup_kinds<'a, 'tcx>(mir: &mir::Mir<'tcx>) -> IndexVec<mir::BasicBlock
260260
result[succ] = CleanupKind::Internal { funclet: funclet };
261261
}
262262
CleanupKind::Funclet => {
263-
set_successor(funclet, succ);
263+
if funclet != succ {
264+
set_successor(funclet, succ);
265+
}
264266
}
265267
CleanupKind::Internal { funclet: succ_funclet } => {
266268
if funclet != succ_funclet {

0 commit comments

Comments
 (0)