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. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits