[cfe-commits] r102677 - /cfe/trunk/lib/CodeGen/CGException.cpp
John McCall
rjmccall at apple.com
Thu Apr 29 17:06:43 PDT 2010
Author: rjmccall
Date: Thu Apr 29 19:06:43 2010
New Revision: 102677
URL: http://llvm.org/viewvc/llvm-project?rev=102677&view=rev
Log:
Teach EHCleanupBlock to deal appropriately with the possibility that there
might not have been an insertion block set at start. Fixes PR6975.
Modified:
cfe/trunk/lib/CodeGen/CGException.cpp
Modified: cfe/trunk/lib/CodeGen/CGException.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGException.cpp?rev=102677&r1=102676&r2=102677&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGException.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGException.cpp Thu Apr 29 19:06:43 2010
@@ -696,7 +696,11 @@
// Resume inserting where we started, but put the new cleanup
// handler in place.
- CGF.Builder.SetInsertPoint(PreviousInsertionBlock);
+ if (PreviousInsertionBlock)
+ CGF.Builder.SetInsertPoint(PreviousInsertionBlock);
+ else
+ CGF.Builder.ClearInsertionPoint();
+
if (CGF.Exceptions)
CGF.setInvokeDest(CleanupHandler);
}
More information about the cfe-commits
mailing list