summaryrefslogtreecommitdiffstats
path: root/llvm
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
commit496636ca6c72b0dc5dc9bfaf9037ee9dde5a7f2e (patch)
tree8bb9fe7f09444f0ea69a6a802b0a0a32c247143c /llvm
parent2af1a44892f542df48d968a67746bb3f5e4a85a6 (diff)
downloadbcm5719-llvm-496636ca6c72b0dc5dc9bfaf9037ee9dde5a7f2e.tar.gz
bcm5719-llvm-496636ca6c72b0dc5dc9bfaf9037ee9dde5a7f2e.zip
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. llvm-svn: 201933
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Support/CFG.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/include/llvm/Support/CFG.h b/llvm/include/llvm/Support/CFG.h
index c0733ca8592..572ab056543 100644
--- a/llvm/include/llvm/Support/CFG.h
+++ b/llvm/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;
OpenPOWER on IntegriCloud