From 7d4bc9c0fb925df6dc812969cb9aa7aa2ec2fd35 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Wed, 22 Apr 2015 23:39:15 +0000 Subject: [WinEH] Don't emit an exceptional cleanup for llvm.eh.endcatch These extra endcatch markers aren't helping identify regions to outline, so let's get rid of them. LLVM outlines (more or less) from begincatch to endcatch. Any unwind edge from an enclosed invoke is a transition to a new exception handler, which has it's own outlining markers. llvm-svn: 235562 --- clang/lib/CodeGen/MicrosoftCXXABI.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/MicrosoftCXXABI.cpp') diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp index f00cd9c81df..42135954bbd 100644 --- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp +++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp @@ -814,7 +814,7 @@ void MicrosoftCXXABI::emitBeginCatch(CodeGenFunction &CGF, if (!CatchParam || !CatchParam->getDeclName()) { llvm::Value *Args[2] = {Exn, llvm::Constant::getNullValue(CGF.Int8PtrTy)}; CGF.EmitNounwindRuntimeCall(BeginCatch, Args); - CGF.EHStack.pushCleanup(NormalAndEHCleanup); + CGF.EHStack.pushCleanup(NormalCleanup); return; } @@ -823,8 +823,7 @@ void MicrosoftCXXABI::emitBeginCatch(CodeGenFunction &CGF, CGF.Builder.CreateBitCast(var.getObjectAddress(CGF), CGF.Int8PtrTy); llvm::Value *Args[2] = {Exn, ParamAddr}; CGF.EmitNounwindRuntimeCall(BeginCatch, Args); - // FIXME: Do we really need exceptional endcatch cleanups? - CGF.EHStack.pushCleanup(NormalAndEHCleanup); + CGF.EHStack.pushCleanup(NormalCleanup); CGF.EmitAutoVarCleanups(var); } -- cgit v1.2.3