summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-31 00:30:05 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-31 00:30:05 +0000
commit8594fcbd1ac28d3103313515e0fbcca41984b7ca (patch)
tree6a46f85a501efe2962d35b86e4f7d77dc792cb93 /clang/lib/CodeGen/CodeGenModule.cpp
parentfe0021a2f999f1edf2d6d13a75f91459676f3684 (diff)
downloadbcm5719-llvm-8594fcbd1ac28d3103313515e0fbcca41984b7ca.tar.gz
bcm5719-llvm-8594fcbd1ac28d3103313515e0fbcca41984b7ca.zip
Make sure that the Attribute object represents one attribute only.
Several places were still treating the Attribute object as respresenting multiple attributes. Those places now use the AttributeSet to represent multiple attributes. llvm-svn: 174004
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 23646b50ba9..80b52978c77 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1232,7 +1232,7 @@ llvm::Constant *
CodeGenModule::GetOrCreateLLVMFunction(StringRef MangledName,
llvm::Type *Ty,
GlobalDecl D, bool ForVTable,
- llvm::Attribute ExtraAttrs) {
+ llvm::AttributeSet ExtraAttrs) {
// Lookup the entry, lazily creating it if necessary.
llvm::GlobalValue *Entry = GetGlobalValue(MangledName);
if (Entry) {
@@ -1268,8 +1268,8 @@ CodeGenModule::GetOrCreateLLVMFunction(StringRef MangledName,
assert(F->getName() == MangledName && "name was uniqued!");
if (D.getDecl())
SetFunctionAttributes(D, F, IsIncompleteFunction);
- if (ExtraAttrs.hasAttributes()) {
- llvm::AttrBuilder B(ExtraAttrs);
+ if (ExtraAttrs.hasAttributes(llvm::AttributeSet::FunctionIndex)) {
+ llvm::AttrBuilder B(ExtraAttrs, llvm::AttributeSet::FunctionIndex);
F->addAttributes(llvm::AttributeSet::FunctionIndex,
llvm::AttributeSet::get(VMContext,
llvm::AttributeSet::FunctionIndex,
@@ -1345,7 +1345,7 @@ llvm::Constant *CodeGenModule::GetAddrOfFunction(GlobalDecl GD,
llvm::Constant *
CodeGenModule::CreateRuntimeFunction(llvm::FunctionType *FTy,
StringRef Name,
- llvm::Attribute ExtraAttrs) {
+ llvm::AttributeSet ExtraAttrs) {
return GetOrCreateLLVMFunction(Name, FTy, GlobalDecl(), /*ForVTable=*/false,
ExtraAttrs);
}
OpenPOWER on IntegriCloud