summaryrefslogtreecommitdiff
path: root/include/llvm/IR
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-04-29 01:57:35 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-04-29 01:57:35 +0000
commitb913bd485a373b699ef15f5c1870ad2fcd40d839 (patch)
treebdc4e915291cf1dfebab6d2d2f74d39ca290043f /include/llvm/IR
parent270f09d712d806443dffa4a1e697f91d6934813e (diff)
downloadllvm-b913bd485a373b699ef15f5c1870ad2fcd40d839.tar.gz
llvm-b913bd485a373b699ef15f5c1870ad2fcd40d839.tar.bz2
llvm-b913bd485a373b699ef15f5c1870ad2fcd40d839.tar.xz
[ADT] Make the iterator adaptor utility a touch more general by
requiring full control over the various parameters to the std::iterator concept / trait thing. This is a precursor for adjusting these things to where you can write a bidirectional iterator wrapping a random access iterator with custom increment and decrement logic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207487 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/IR')
-rw-r--r--include/llvm/IR/User.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/IR/User.h b/include/llvm/IR/User.h
index 453b6ad169..bc7696bdaf 100644
--- a/include/llvm/IR/User.h
+++ b/include/llvm/IR/User.h
@@ -131,8 +131,9 @@ public:
/// Convenience iterator for directly iterating over the Values in the
/// OperandList
struct value_op_iterator
- : iterator_adaptor_base<value_op_iterator, op_iterator, Value *, Value *,
- Value *> {
+ : iterator_adaptor_base<value_op_iterator, op_iterator,
+ std::random_access_iterator_tag, Value *,
+ ptrdiff_t, Value *, Value *> {
explicit value_op_iterator(Use *U = nullptr) : iterator_adaptor_base(U) {}
Value *operator*() const { return *I; }