[llvm] r222661 - Adding const iterator to MCInst. http://reviews.llvm.org/D6359

Colin LeMahieu colinl at codeaurora.org
Mon Nov 24 08:50:40 PST 2014


Author: colinl
Date: Mon Nov 24 10:50:40 2014
New Revision: 222661

URL: http://llvm.org/viewvc/llvm-project?rev=222661&view=rev
Log:
Adding const iterator to MCInst. http://reviews.llvm.org/D6359

Modified:
    llvm/trunk/include/llvm/MC/MCInst.h

Modified: llvm/trunk/include/llvm/MC/MCInst.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCInst.h?rev=222661&r1=222660&r2=222661&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCInst.h (original)
+++ llvm/trunk/include/llvm/MC/MCInst.h Mon Nov 24 10:50:40 2014
@@ -172,8 +172,11 @@ public:
   size_t size() { return Operands.size(); }
 
   typedef SmallVectorImpl<MCOperand>::iterator iterator;
+  typedef SmallVectorImpl<MCOperand>::const_iterator const_iterator;
   iterator begin() { return Operands.begin(); }
-  iterator end()   { return Operands.end();   }
+  const_iterator begin() const { return Operands.begin(); }
+  iterator end()   { return Operands.end(); }
+  const_iterator end() const { return Operands.end(); }
   iterator insert(iterator I, const MCOperand &Op) {
     return Operands.insert(I, Op);
   }





More information about the llvm-commits mailing list