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
This commit is contained in:
Jakob Stoklund Olesen
2010-12-03 19:02:00 +00:00
parent b531f45a9d
commit 7a26aca73f
3 changed files with 296 additions and 33 deletions
+3 -3
View File
@@ -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