Convert BuildLibCalls.cpp to using the AttributeSet methods instead of AttributeWithIndex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173536 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp
index 45f8184..c033b5a 100644
--- a/lib/IR/Attributes.cpp
+++ b/lib/IR/Attributes.cpp
@@ -605,8 +605,14 @@
}
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) {