Hi chandlerc, dblaikie,
This fixes the leak described in http://llvm.org/bugs/show_bug.cgi?id=18318
http://llvm-reviews.chandlerc.com/D2474
Files:
lib/CodeGen/CGException.cpp
Index: lib/CodeGen/CGException.cpp
===================================================================
--- lib/CodeGen/CGException.cpp
+++ lib/CodeGen/CGException.cpp
@@ -1244,6 +1244,8 @@
// If the catch was not required, bail out now.
if (!CatchScope.hasEHBranches()) {
+ for (unsigned I = 0; I != NumHandlers; ++I)
+ delete CatchScope.getHandler(I).Block;
EHStack.popCatch();
return;
}
Index: lib/CodeGen/CGException.cpp
===================================================================
--- lib/CodeGen/CGException.cpp
+++ lib/CodeGen/CGException.cpp
@@ -1244,6 +1244,8 @@
// If the catch was not required, bail out now.
if (!CatchScope.hasEHBranches()) {
+ for (unsigned I = 0; I != NumHandlers; ++I)
+ delete CatchScope.getHandler(I).Block;
EHStack.popCatch();
return;
}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits