From 285cfd8953d4ca4da613a47a0d691f7234068f8c Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 19 Sep 2011 20:31:14 +0000 Subject: Throw the switch to convert clang to the new exception handling model! This model uses the 'landingpad' instruction, which is pinned to the top of the landing pad. (A landing pad is defined as the destination of the unwind branch of an invoke instruction.) All of the information needed to generate the correct exception handling metadata during code generation is encoded into the landingpad instruction. The new 'resume' instruction takes the place of the llvm.eh.resume intrinsic call. It's lowered in much the same way as the intrinsic is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140049 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenFunction.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CodeGenFunction.cpp') diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp index b4b2eb16ad..d38a9b0859 100644 --- a/lib/CodeGen/CodeGenFunction.cpp +++ b/lib/CodeGen/CodeGenFunction.cpp @@ -365,9 +365,12 @@ static void TryMarkNoThrow(llvm::Function *F) { for (llvm::Function::iterator FI = F->begin(), FE = F->end(); FI != FE; ++FI) for (llvm::BasicBlock::iterator BI = FI->begin(), BE = FI->end(); BI != BE; ++BI) - if (llvm::CallInst *Call = dyn_cast(&*BI)) + if (llvm::CallInst *Call = dyn_cast(&*BI)) { if (!Call->doesNotThrow()) return; + } else if (isa(&*BI)) { + return; + } F->setDoesNotThrow(true); } -- cgit v1.2.3-18-g5258