Use the Attributes::get method which takes an AttrVal value directly to simplify the code a bit. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166010 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/ItaniumCXXABI.cpp b/lib/CodeGen/ItaniumCXXABI.cpp
index bb63cb3..674a97d 100644
--- a/lib/CodeGen/ItaniumCXXABI.cpp
+++ b/lib/CodeGen/ItaniumCXXABI.cpp
@@ -950,11 +950,9 @@
llvm::FunctionType *FTy =
llvm::FunctionType::get(CGM.getTypes().ConvertType(CGM.getContext().IntTy),
GuardPtrTy, /*isVarArg=*/false);
- llvm::AttrBuilder B;
- B.addAttribute(llvm::Attributes::NoUnwind);
return CGM.CreateRuntimeFunction(FTy, "__cxa_guard_acquire",
llvm::Attributes::get(CGM.getLLVMContext(),
- B));
+ llvm::Attributes::NoUnwind));
}
static llvm::Constant *getGuardReleaseFn(CodeGenModule &CGM,
@@ -962,11 +960,9 @@
// void __cxa_guard_release(__guard *guard_object);
llvm::FunctionType *FTy =
llvm::FunctionType::get(CGM.VoidTy, GuardPtrTy, /*isVarArg=*/false);
- llvm::AttrBuilder B;
- B.addAttribute(llvm::Attributes::NoUnwind);
return CGM.CreateRuntimeFunction(FTy, "__cxa_guard_release",
llvm::Attributes::get(CGM.getLLVMContext(),
- B));
+ llvm::Attributes::NoUnwind));
}
static llvm::Constant *getGuardAbortFn(CodeGenModule &CGM,
@@ -974,11 +970,9 @@
// void __cxa_guard_abort(__guard *guard_object);
llvm::FunctionType *FTy =
llvm::FunctionType::get(CGM.VoidTy, GuardPtrTy, /*isVarArg=*/false);
- llvm::AttrBuilder B;
- B.addAttribute(llvm::Attributes::NoUnwind);
return CGM.CreateRuntimeFunction(FTy, "__cxa_guard_abort",
llvm::Attributes::get(CGM.getLLVMContext(),
- B));
+ llvm::Attributes::NoUnwind));
}
namespace {