summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLogan Chien <tzuhsiang.chien@gmail.com>2014-02-22 09:06:55 +0000
committerLogan Chien <tzuhsiang.chien@gmail.com>2014-02-22 09:06:55 +0000
commit8c0eb3eee8d5f7894c9cfee6e6c4e5fb2d5c1c82 (patch)
tree86831ff26b8f40b562b7385612cf5c2dbbb8e445 /include
parenta7101ebc862d49ec5dbfe4ef4c982a5c04b6c726 (diff)
downloadllvm-8c0eb3eee8d5f7894c9cfee6e6c4e5fb2d5c1c82.tar.gz
llvm-8c0eb3eee8d5f7894c9cfee6e6c4e5fb2d5c1c82.tar.bz2
llvm-8c0eb3eee8d5f7894c9cfee6e6c4e5fb2d5c1c82.tar.xz
Add const to some member functions of SuccIterator.
The operator+() and operator-() do not change the member variables of SuccIterator. This CL will qualify the *this* pointer with const. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201933 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/CFG.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/llvm/Support/CFG.h b/include/llvm/Support/CFG.h
index c0733ca859..572ab05654 100644
--- a/include/llvm/Support/CFG.h
+++ b/include/llvm/Support/CFG.h
@@ -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;