[llvm] r231062 - Add range iterators to Extract/InsertValueInst indices
Daniel Berlin
dberlin at dberlin.org
Tue Mar 3 01:31:01 PST 2015
Author: dannyb
Date: Tue Mar 3 03:31:01 2015
New Revision: 231062
URL: http://llvm.org/viewvc/llvm-project?rev=231062&view=rev
Log:
Add range iterators to Extract/InsertValueInst indices
Modified:
llvm/trunk/include/llvm/IR/Instructions.h
Modified: llvm/trunk/include/llvm/IR/Instructions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Instructions.h?rev=231062&r1=231061&r2=231062&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Instructions.h (original)
+++ llvm/trunk/include/llvm/IR/Instructions.h Tue Mar 3 03:31:01 2015
@@ -1908,6 +1908,9 @@ public:
typedef const unsigned* idx_iterator;
inline idx_iterator idx_begin() const { return Indices.begin(); }
inline idx_iterator idx_end() const { return Indices.end(); }
+ inline iterator_range<idx_iterator> indices() const {
+ return iterator_range<idx_iterator>(idx_begin(), idx_end());
+ }
Value *getAggregateOperand() {
return getOperand(0);
@@ -2019,6 +2022,9 @@ public:
typedef const unsigned* idx_iterator;
inline idx_iterator idx_begin() const { return Indices.begin(); }
inline idx_iterator idx_end() const { return Indices.end(); }
+ inline iterator_range<idx_iterator> indices() const {
+ return iterator_range<idx_iterator>(idx_begin(), idx_end());
+ }
Value *getAggregateOperand() {
return getOperand(0);
More information about the llvm-commits
mailing list