================
Comment at: lib/CodeGen/CGException.cpp:1247-1248
@@ -1246,2 +1246,4 @@
if (!CatchScope.hasEHBranches()) {
+ for (unsigned I = 0; I != NumHandlers; ++I)
+ delete CatchScope.getHandler(I).Block;
EHStack.popCatch();
----------------
This should really be a method on the EHCatchScope object. I would call it
'clearHandlerBlocks()'.
I would also add a FIXME comment to that function which suggests switching
EHCatchScope to *always* clear the blocks on destruction, and to add a
'takeHandler' or some such function which removes ownership from the
EHCatchScope. Not asking that you make this change because of the innards of
EHCatchScope I expect this change would be somewhat invasive and awkward to do.
http://llvm-reviews.chandlerc.com/D2474
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits