aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjCMac.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-07-23 21:56:41 +0000
committerJohn McCall <rjmccall@apple.com>2010-07-23 21:56:41 +0000
commitff8e11579fc904aa4032d90d2be6ce1ac5fc9fe1 (patch)
treeb069af57037631391abe9daba285d6d35dc88711 /lib/CodeGen/CGObjCMac.cpp
parenteb024acef8a8fef3cb5e01a2e0c3efb90372c8af (diff)
Revise cleanup IR generation to fix a major bug with cleanups (PR7686)
as well as some significant asymptotic inefficiencies with threading multiple jumps through deep cleanups. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109274 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjCMac.cpp')
-rw-r--r--lib/CodeGen/CGObjCMac.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp
index dc9593f6ea..d917c7d8a8 100644
--- a/lib/CodeGen/CGObjCMac.cpp
+++ b/lib/CodeGen/CGObjCMac.cpp
@@ -2953,11 +2953,11 @@ void CGObjCMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
// Pop the cleanup.
CGF.PopCleanupBlock();
- CGF.EmitBlock(FinallyEnd.Block);
+ CGF.EmitBlock(FinallyEnd.getBlock());
// Emit the rethrow block.
CGF.Builder.ClearInsertionPoint();
- CGF.EmitBlock(FinallyRethrow.Block, true);
+ CGF.EmitBlock(FinallyRethrow.getBlock(), true);
if (CGF.HaveInsertPoint()) {
CGF.Builder.CreateCall(ObjCTypes.getExceptionThrowFn(),
CGF.Builder.CreateLoad(RethrowPtr))
@@ -2965,7 +2965,7 @@ void CGObjCMac::EmitTryOrSynchronizedStmt(CodeGen::CodeGenFunction &CGF,
CGF.Builder.CreateUnreachable();
}
- CGF.Builder.SetInsertPoint(FinallyEnd.Block);
+ CGF.Builder.SetInsertPoint(FinallyEnd.getBlock());
}
void CGObjCMac::EmitThrowStmt(CodeGen::CodeGenFunction &CGF,
@@ -5895,8 +5895,8 @@ void CGObjCNonFragileABIMac::EmitTryStmt(CodeGen::CodeGenFunction &CGF,
if (S.getFinallyStmt())
CGF.ExitFinallyBlock(FinallyInfo);
- if (Cont.Block)
- CGF.EmitBlock(Cont.Block);
+ if (Cont.isValid())
+ CGF.EmitBlock(Cont.getBlock());
}
/// EmitThrowStmt - Generate code for a throw statement.