[cfe-commits] r90574 - /cfe/trunk/lib/CodeGen/CGException.cpp
Mike Stump
mrs at apple.com
Fri Dec 4 11:03:48 PST 2009
Author: mrs
Date: Fri Dec 4 13:03:47 2009
New Revision: 90574
URL: http://llvm.org/viewvc/llvm-project?rev=90574&view=rev
Log:
Fix warning and be sure to set up the rethrow pointer if we fall off
the end of all the catches.
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=90574&r1=90573&r2=90574&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGException.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGException.cpp Fri Dec 4 13:03:47 2009
@@ -138,7 +138,7 @@
// CodeGenFunction::CleanupScope TryScope(CGF);
{
// These actions are only on the exceptional edge.
-#if 0
+ if (0) {
// FIXME: Doesn't work well with eh31.C and PopCXXTemporary
CodeGenFunction::DelayedCleanupBlock Scope(CGF, true);
@@ -147,7 +147,7 @@
= llvm::Type::getInt8PtrTy(CGF.getLLVMContext());
llvm::Value *ExceptionPtr = CGF.Builder.CreateBitCast(N, Int8PtrTy);
CGF.Builder.CreateCall(FreeExceptionFn, ExceptionPtr);
-#endif
+ }
}
llvm::Value *Src = CGF.EmitLValue(E).getAddress();
@@ -461,8 +461,10 @@
if (Next)
EmitBlock(Next);
}
- if (!HasCatchAll)
+ if (!HasCatchAll) {
+ Builder.CreateStore(Exc, RethrowPtr);
EmitBranchThroughCleanup(FinallyRethrow);
+ }
CodeGenFunction::CleanupBlockInfo Info = PopCleanupBlock();
More information about the cfe-commits
mailing list