From: Mike Stump Date: Wed, 9 Dec 2009 23:49:53 +0000 (+0000) Subject: Add terminate handler to cleanups on exceptional edges. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=20d3a53cef96ed1d42ec82a313e8453cfef6512b;p=clang Add terminate handler to cleanups on exceptional edges. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90996 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 30cc5d9cbf..7ef3ad0422 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -161,10 +161,9 @@ public: CleanupEntryBB(CGF.createBasicBlock("ehcleanup.rest")), PreviousInvokeDest(CGF.getInvokeDest()) { CGF.EmitBranch(Cont); + llvm::BasicBlock *TerminateHandler = CGF.getTerminateHandler(); CGF.Builder.SetInsertPoint(CleanupEntryBB); - - // FIXME: set up terminate handler here - // CGF.setInvokeDest(TerminateHandler); + CGF.setInvokeDest(TerminateHandler); } ~EHCleanupBlock(); };