aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetInfo.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-23 00:21:06 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-23 00:21:06 +0000
commit909b6ded6be68a5740d98b478454fa55ea817ad6 (patch)
tree9fa48a8c97ae513368ca943dfe3de8a94b84147d /lib/CodeGen/TargetInfo.cpp
parent3cc6277a3dd4986af6422e41db18ba6efddbd800 (diff)
Use the AttributeSet when adding multiple attributes and an Attribute::AttrKind
when adding a single attribute to the function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173211 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetInfo.cpp')
-rw-r--r--lib/CodeGen/TargetInfo.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/TargetInfo.cpp b/lib/CodeGen/TargetInfo.cpp
index 9811143c8d..6803853578 100644
--- a/lib/CodeGen/TargetInfo.cpp
+++ b/lib/CodeGen/TargetInfo.cpp
@@ -1019,8 +1019,10 @@ void X86_32TargetCodeGenInfo::SetTargetAttributes(const Decl *D,
// Now add the 'alignstack' attribute with a value of 16.
llvm::AttrBuilder B;
B.addStackAlignmentAttr(16);
- Fn->addAttribute(llvm::AttributeSet::FunctionIndex,
- llvm::Attribute::get(CGM.getLLVMContext(), B));
+ Fn->addAttributes(llvm::AttributeSet::FunctionIndex,
+ llvm::AttributeSet::get(CGM.getLLVMContext(),
+ llvm::AttributeSet::FunctionIndex,
+ B));
}
}
}