From abca5a1b3e74e644e297c7590b46ab73a6bb476a Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 25 May 2011 03:44:55 +0000 Subject: [PATCH] Update for llvm api change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132034 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/BackendUtil.cpp | 1 - lib/CodeGen/CodeGenModule.cpp | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp index 34c1635daa..01d15ff7f7 100644 --- a/lib/CodeGen/BackendUtil.cpp +++ b/lib/CodeGen/BackendUtil.cpp @@ -209,7 +209,6 @@ bool EmitAssemblyHelper::AddEmitPasses(BackendAction Action, NoZerosInBSS = CodeGenOpts.NoZeroInitializedInBSS; llvm::UnsafeFPMath = CodeGenOpts.UnsafeFPMath; llvm::UseSoftFloat = CodeGenOpts.SoftFloat; - UnwindTablesMandatory = CodeGenOpts.UnwindTables; TargetMachine::setAsmVerbosityDefault(CodeGenOpts.AsmVerbose); diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 4f2b10ad65..987ebffd97 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -452,6 +452,9 @@ void CodeGenModule::SetLLVMFunctionAttributes(const Decl *D, void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, llvm::Function *F) { + if (CodeGenOpts.UnwindTables) + F->setHasUWTable(); + if (!Features.Exceptions && !Features.ObjCNonFragileABI) F->addFnAttr(llvm::Attribute::NoUnwind); -- 2.40.0