summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Attributes.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-26 00:03:11 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-26 00:03:11 +0000
commit201d7b2545f112cd5774e803011ac9b0edfb40d3 (patch)
tree2fae628bb2f075a4f65122e446f1ce809fad6dbe /llvm/lib/IR/Attributes.cpp
parent7865220da4592eeaab51269aa39e11c4de9a5122 (diff)
downloadbcm5719-llvm-201d7b2545f112cd5774e803011ac9b0edfb40d3.tar.gz
bcm5719-llvm-201d7b2545f112cd5774e803011ac9b0edfb40d3.zip
Convert BuildLibCalls.cpp to using the AttributeSet methods instead of AttributeWithIndex.
llvm-svn: 173536
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r--llvm/lib/IR/Attributes.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp
index 45f81844a17..c033b5a005c 100644
--- a/llvm/lib/IR/Attributes.cpp
+++ b/llvm/lib/IR/Attributes.cpp
@@ -605,8 +605,14 @@ AttributeSet AttributeSet::get(LLVMContext &C, unsigned Idx, AttrBuilder &B) {
}
AttributeSet AttributeSet::get(LLVMContext &C, unsigned Idx,
- Attribute::AttrKind Kind) {
- return get(C, AttributeWithIndex::get(Idx, Attribute::get(C, Kind)));
+ ArrayRef<Attribute::AttrKind> Kind) {
+ // FIXME: This is temporary. Ultimately, the AttributeWithIndex will be
+ // replaced by an object that holds multiple Attribute::AttrKinds.
+ AttrBuilder B;
+ for (ArrayRef<Attribute::AttrKind>::iterator I = Kind.begin(),
+ E = Kind.end(); I != E; ++I)
+ B.addAttribute(*I);
+ return get(C, Idx, B);
}
AttributeSet AttributeSet::get(LLVMContext &C, ArrayRef<AttributeSet> Attrs) {
OpenPOWER on IntegriCloud