From 06bc0caa1f82696f7dbb5c772f5bf0b885f51ed8 Mon Sep 17 00:00:00 2001 From: Colin LeMahieu Date: Mon, 24 Nov 2014 16:50:40 +0000 Subject: [PATCH] Adding const iterator to MCInst. http://reviews.llvm.org/D6359 llvm-svn: 222661 --- llvm/include/llvm/MC/MCInst.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/llvm/include/llvm/MC/MCInst.h b/llvm/include/llvm/MC/MCInst.h index 6918280a4219..751d61563d23 100644 --- a/llvm/include/llvm/MC/MCInst.h +++ b/llvm/include/llvm/MC/MCInst.h @@ -172,8 +172,11 @@ public: size_t size() { return Operands.size(); } typedef SmallVectorImpl::iterator iterator; + typedef SmallVectorImpl::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); }