From 102530719f194444ad80462d05bb2c06e7c93611 Mon Sep 17 00:00:00 2001 From: Mike Stump Date: Wed, 9 Dec 2009 23:49:53 +0000 Subject: Add terminate handler to cleanups on exceptional edges. llvm-svn: 90996 --- clang/lib/CodeGen/CodeGenFunction.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenFunction.h') diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 30cc5d9cbf2..7ef3ad0422f 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/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(); }; -- cgit v1.2.3