Use the appropriate Attributes::get method to create an Attributes object.

llvm-svn: 166035
This commit is contained in:
Bill Wendling 2012-10-16 18:06:06 +00:00
parent de78bba047
commit 53a6f63c26
1 changed files with 1 additions and 7 deletions

View File

@ -290,15 +290,9 @@ struct AttributeWithIndex {
static AttributeWithIndex get(LLVMContext &C, unsigned Idx,
ArrayRef<Attributes::AttrVal> Attrs) {
AttrBuilder B;
for (ArrayRef<Attributes::AttrVal>::iterator I = Attrs.begin(),
E = Attrs.end(); I != E; ++I)
B.addAttribute(*I);
AttributeWithIndex P;
P.Index = Idx;
P.Attrs = Attributes::get(C, B);
P.Attrs = Attributes::get(C, Attrs);
return P;
}
static AttributeWithIndex get(unsigned Idx, Attributes Attrs) {