aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-01-21 22:30:26 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-01-21 22:30:26 +0000
commit2dda3325af603841cbe924bdbc422c74751265a9 (patch)
tree40d3ca8d0e2e0e85ad55eb58e429dd98b2cdae7c /utils
parent7d46f87a3aa520069b85d8a1a14bc6624d1f4d94 (diff)
downloadexternal_llvm-2dda3325af603841cbe924bdbc422c74751265a9.zip
external_llvm-2dda3325af603841cbe924bdbc422c74751265a9.tar.gz
external_llvm-2dda3325af603841cbe924bdbc422c74751265a9.tar.bz2
Provide iterator access to ListInit contents
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46223 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/Record.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/TableGen/Record.h b/utils/TableGen/Record.h
index aa4a695..2e2e46c 100644
--- a/utils/TableGen/Record.h
+++ b/utils/TableGen/Record.h
@@ -643,6 +643,17 @@ public:
virtual Init *resolveReferences(Record &R, const RecordVal *RV);
virtual std::string getAsString() const;
+
+ typedef std::vector<Init*>::iterator iterator;
+ typedef std::vector<Init*>::const_iterator const_iterator;
+
+ inline iterator begin() { return Values.begin(); }
+ inline const_iterator begin() const { return Values.begin(); }
+ inline iterator end () { return Values.end(); }
+ inline const_iterator end () const { return Values.end(); }
+
+ inline size_t size () const { return Values.size(); }
+ inline bool empty() const { return Values.empty(); }
};
/// BinOpInit - !op (X, Y) - Combine two inits.