[PATCH] D13797: [WinEH] Fix endpad coloring/numbering

Joseph Tremoulet via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 16 11:07:42 PDT 2015


JosephTremoulet added a comment.

> I noticed this extra cloning while working on the multi-parent cloning, but it seemed like the extra cloned blocks were generally cleared away by the cleanup code (at least in the cases I was debugging).


Yeah, the trick to get an extra catchendpad to stick around (which PR25163 uncovered) is that a catch chained to the catchendpad needs to contain both an inner cleanup whose cleanupret/cleanupendpad unwinds to the catchendpad (so we give it the extra color) and an invoke, inside the catch but outside its cleanup, which also unwinds to the catchendpad (so that cloning will rewrite the invoke unwind dest to the cloned catchendpad).


http://reviews.llvm.org/D13797





More information about the llvm-commits mailing list