[llvm-commits] [llvm] r46223 - /llvm/trunk/utils/TableGen/Record.h
Anton Korobeynikov
asl at math.spbu.ru
Mon Jan 21 14:30:27 PST 2008
Author: asl
Date: Mon Jan 21 16:30:26 2008
New Revision: 46223
URL: http://llvm.org/viewvc/llvm-project?rev=46223&view=rev
Log:
Provide iterator access to ListInit contents
Modified:
llvm/trunk/utils/TableGen/Record.h
Modified: llvm/trunk/utils/TableGen/Record.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/Record.h?rev=46223&r1=46222&r2=46223&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/Record.h (original)
+++ llvm/trunk/utils/TableGen/Record.h Mon Jan 21 16:30:26 2008
@@ -643,6 +643,17 @@
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.
More information about the llvm-commits
mailing list