Attributes Rewrite
Convert the uses of the Attributes class over to the new format. The
Attributes::get method call now takes an LLVM context so that the attributes
object can be uniquified and stored.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165918 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/ItaniumCXXABI.cpp b/lib/CodeGen/ItaniumCXXABI.cpp
index 4d94430..42ca81e 100644
--- a/lib/CodeGen/ItaniumCXXABI.cpp
+++ b/lib/CodeGen/ItaniumCXXABI.cpp
@@ -953,7 +953,8 @@
llvm::Attributes::Builder B;
B.addAttribute(llvm::Attributes::NoUnwind);
return CGM.CreateRuntimeFunction(FTy, "__cxa_guard_acquire",
- llvm::Attributes::get(B));
+ llvm::Attributes::get(CGM.getLLVMContext(),
+ B));
}
static llvm::Constant *getGuardReleaseFn(CodeGenModule &CGM,
@@ -964,7 +965,8 @@
llvm::Attributes::Builder B;
B.addAttribute(llvm::Attributes::NoUnwind);
return CGM.CreateRuntimeFunction(FTy, "__cxa_guard_release",
- llvm::Attributes::get(B));
+ llvm::Attributes::get(CGM.getLLVMContext(),
+ B));
}
static llvm::Constant *getGuardAbortFn(CodeGenModule &CGM,
@@ -975,7 +977,8 @@
llvm::Attributes::Builder B;
B.addAttribute(llvm::Attributes::NoUnwind);
return CGM.CreateRuntimeFunction(FTy, "__cxa_guard_abort",
- llvm::Attributes::get(B));
+ llvm::Attributes::get(CGM.getLLVMContext(),
+ B));
}
namespace {