aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2012-05-28 01:47:44 +0000
committerChris Lattner <sabre@nondot.org>2012-05-28 01:47:44 +0000
commitd509d0b532ec2358b3f341d4a4cd1411cb8b5db2 (patch)
treeccb049af92ff02e28b5416be519b91d2881e436a /include
parent2a9d3b79db1f192dba43b8b16755a7822b05f798 (diff)
switch AttrListPtr::get to take an ArrayRef, simplifying a lot of clients.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157556 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Attributes.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/include/llvm/Attributes.h b/include/llvm/Attributes.h
index 0099f173b6..7b17cd271f 100644
--- a/include/llvm/Attributes.h
+++ b/include/llvm/Attributes.h
@@ -16,6 +16,7 @@
#define LLVM_ATTRIBUTES_H
#include "llvm/Support/MathExtras.h"
+#include "llvm/ADT/ArrayRef.h"
#include <cassert>
#include <string>
@@ -268,16 +269,8 @@ public:
// Attribute List Construction and Mutation
//===--------------------------------------------------------------------===//
- /// get - Return a Attributes list with the specified parameter in it.
- static AttrListPtr get(const AttributeWithIndex *Attr, unsigned NumAttrs);
-
- /// get - Return a Attribute list with the parameters specified by the
- /// consecutive random access iterator range.
- template <typename Iter>
- static AttrListPtr get(const Iter &I, const Iter &E) {
- if (I == E) return AttrListPtr(); // Empty list.
- return get(&*I, static_cast<unsigned>(E-I));
- }
+ /// get - Return a Attributes list with the specified parameters in it.
+ static AttrListPtr get(ArrayRef<AttributeWithIndex> Attrs);
/// addAttr - Add the specified attribute at the specified index to this
/// attribute list. Since attribute lists are immutable, this