summaryrefslogtreecommitdiff
path: root/include/llvm/Attributes.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-10-16 18:06:06 +0000
committerBill Wendling <isanbard@gmail.com>2012-10-16 18:06:06 +0000
commite6c994149aa1922ba74177ec1bdcc5db5c9e3f88 (patch)
tree229bd484661dc5f5cfa70affbd7594e14479e2a3 /include/llvm/Attributes.h
parent82e9bc2f57c00c200d7227b94891f272462d9292 (diff)
downloadllvm-e6c994149aa1922ba74177ec1bdcc5db5c9e3f88.tar.gz
llvm-e6c994149aa1922ba74177ec1bdcc5db5c9e3f88.tar.bz2
llvm-e6c994149aa1922ba74177ec1bdcc5db5c9e3f88.tar.xz
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
Diffstat (limited to 'include/llvm/Attributes.h')
-rw-r--r--include/llvm/Attributes.h8
1 files changed, 1 insertions, 7 deletions
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<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) {