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://review.tizen.org/git/?a=commitdiff_plain;h=53a6f63c26f3a7dd35d57c8be15a7dd0e5400531;p=platform%2Fupstream%2Fllvm.git Use the appropriate Attributes::get method to create an Attributes object. llvm-svn: 166035 --- diff --git a/llvm/include/llvm/Attributes.h b/llvm/include/llvm/Attributes.h index a28aa18..4222a62 100644 --- a/llvm/include/llvm/Attributes.h +++ b/llvm/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) {