iterator based accessors for CodeGenInstruction operand list.
authorJim Grosbach <grosbach@apple.com>
Fri, 18 Apr 2014 02:08:58 +0000 (02:08 +0000)
committerJim Grosbach <grosbach@apple.com>
Fri, 18 Apr 2014 02:08:58 +0000 (02:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206550 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/CodeGenInstruction.h

index 00d89bf1037438adfd09e06e154aac03bfa133c7..75afab5c693fbf150b3c14b6edbd6d7d779e3e38 100644 (file)
@@ -149,6 +149,13 @@ namespace llvm {
     OperandInfo &back() { return OperandList.back(); }
     const OperandInfo &back() const { return OperandList.back(); }
 
+    typedef std::vector<OperandInfo>::iterator iterator;
+    typedef std::vector<OperandInfo>::const_iterator const_iterator;
+    iterator begin() { return OperandList.begin(); }
+    const_iterator begin() const { return OperandList.begin(); }
+    iterator end() { return OperandList.end(); }
+    const_iterator end() const { return OperandList.end(); }
+
 
     /// getOperandNamed - Return the index of the operand with the specified
     /// non-empty name.  If the instruction does not have an operand with the