Remove the final bits of Attributes being declared in the Attribute
namespace. Use the attribute's enum value instead. No functionality change
intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165611 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/ItaniumCXXABI.cpp b/lib/CodeGen/ItaniumCXXABI.cpp
index 3c92581..4d94430 100644
--- a/lib/CodeGen/ItaniumCXXABI.cpp
+++ b/lib/CodeGen/ItaniumCXXABI.cpp
@@ -950,9 +950,10 @@
llvm::FunctionType *FTy =
llvm::FunctionType::get(CGM.getTypes().ConvertType(CGM.getContext().IntTy),
GuardPtrTy, /*isVarArg=*/false);
-
+ llvm::Attributes::Builder B;
+ B.addAttribute(llvm::Attributes::NoUnwind);
return CGM.CreateRuntimeFunction(FTy, "__cxa_guard_acquire",
- llvm::Attribute::NoUnwind);
+ llvm::Attributes::get(B));
}
static llvm::Constant *getGuardReleaseFn(CodeGenModule &CGM,
@@ -960,9 +961,10 @@
// void __cxa_guard_release(__guard *guard_object);
llvm::FunctionType *FTy =
llvm::FunctionType::get(CGM.VoidTy, GuardPtrTy, /*isVarArg=*/false);
-
+ llvm::Attributes::Builder B;
+ B.addAttribute(llvm::Attributes::NoUnwind);
return CGM.CreateRuntimeFunction(FTy, "__cxa_guard_release",
- llvm::Attribute::NoUnwind);
+ llvm::Attributes::get(B));
}
static llvm::Constant *getGuardAbortFn(CodeGenModule &CGM,
@@ -970,9 +972,10 @@
// void __cxa_guard_abort(__guard *guard_object);
llvm::FunctionType *FTy =
llvm::FunctionType::get(CGM.VoidTy, GuardPtrTy, /*isVarArg=*/false);
-
+ llvm::Attributes::Builder B;
+ B.addAttribute(llvm::Attributes::NoUnwind);
return CGM.CreateRuntimeFunction(FTy, "__cxa_guard_abort",
- llvm::Attribute::NoUnwind);
+ llvm::Attributes::get(B));
}
namespace {