summaryrefslogtreecommitdiff
path: root/lib/Support/IntervalMap.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-12-03 19:02:00 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-12-03 19:02:00 +0000
commit7a26aca73ff2c8c4cb3205a776cc6743949b1fb7 (patch)
tree6561ccbb2d4dab67d361f844e1a59cc2038d8d79 /lib/Support/IntervalMap.cpp
parentb531f45a9dca5a2b8cc25d98f2fa9f0ab5955820 (diff)
downloadllvm-7a26aca73ff2c8c4cb3205a776cc6743949b1fb7.tar.gz
llvm-7a26aca73ff2c8c4cb3205a776cc6743949b1fb7.tar.bz2
llvm-7a26aca73ff2c8c4cb3205a776cc6743949b1fb7.tar.xz
Add IntervalMap::iterator::set{Start,Stop,Value} methods that allow limited
editing of the current interval. These methods may cause coalescing, there are corresponding set*Unchecked methods for editing without coalescing. The non-coalescing methods are useful for applying monotonic transforms to all keys or values in a map without accidentally coalescing transformed and untransformed intervals. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120829 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/IntervalMap.cpp')
-rw-r--r--lib/Support/IntervalMap.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Support/IntervalMap.cpp b/lib/Support/IntervalMap.cpp
index 6f39b183a1..4dfcc404ca 100644
--- a/lib/Support/IntervalMap.cpp
+++ b/lib/Support/IntervalMap.cpp
@@ -79,11 +79,11 @@ NodeRef Path::getRightSibling(unsigned Level) const {
// Go up the tree until we can go right.
unsigned l = Level - 1;
- while (l && atLastBranch(l))
+ while (l && atLastEntry(l))
--l;
// We can't go right.
- if (atLastBranch(l))
+ if (atLastEntry(l))
return NodeRef();
// NR is the subtree containing our right sibling.
@@ -100,7 +100,7 @@ void Path::moveRight(unsigned Level) {
// Go up the tree until we can go right.
unsigned l = Level - 1;
- while (l && atLastBranch(l))
+ while (l && atLastEntry(l))
--l;
// NR is the subtree containing our right sibling. If we hit end(), we have