Add const to some member functions of SuccIterator.
[oota-llvm.git] / include / llvm / Support / CFG.h
index c0733ca8592008876d55bc717127b8da3183bc16..572ab05654348f1a9eac8b7077e7fcaf1768c2bd 100644 (file)
@@ -208,7 +208,7 @@ public:
     return *this;
   }
 
-  inline Self operator+(int Right) {
+  inline Self operator+(int Right) const {
     Self tmp = *this;
     tmp += Right;
     return tmp;
@@ -218,11 +218,11 @@ public:
     return operator+=(-Right);
   }
 
-  inline Self operator-(int Right) {
+  inline Self operator-(int Right) const {
     return operator+(-Right);
   }
 
-  inline int operator-(const Self& x) {
+  inline int operator-(const Self& x) const {
     assert(Term == x.Term && "Cannot work on iterators of different blocks!");
     int distance = idx - x.idx;
     return distance;