From e6c994149aa1922ba74177ec1bdcc5db5c9e3f88 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 16 Oct 2012 18:06:06 +0000 Subject: 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 --- include/llvm/Attributes.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'include/llvm/Attributes.h') diff --git a/include/llvm/Attributes.h b/include/llvm/Attributes.h index a28aa18347..4222a62251 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) { -- cgit v1.2.3