diff --git a/include/llvm/Attributes.h b/include/llvm/Attributes.h index a28aa183473..4222a62251b 100644 --- a/include/llvm/Attributes.h +++ b/include/llvm/Attributes.h @@ -290,15 +290,9 @@ struct AttributeWithIndex { static AttributeWithIndex get(LLVMContext &C, unsigned Idx, ArrayRef Attrs) { - AttrBuilder B; - - for (ArrayRef::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) {