From: Bill Wendling Date: Tue, 16 Oct 2012 18:06:06 +0000 (+0000) Subject: Use the appropriate Attributes::get method to create an Attributes object. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=e6c994149aa1922ba74177ec1bdcc5db5c9e3f88;p=oota-llvm.git Use the appropriate Attributes::get method to create an Attributes object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166035 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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) {