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
diff --git a/lib/Support/IntervalMap.cpp b/lib/Support/IntervalMap.cpp
index 6f39b18..4dfcc40 100644
--- a/lib/Support/IntervalMap.cpp
+++ b/lib/Support/IntervalMap.cpp
@@ -79,11 +79,11 @@
 
   // 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 @@
 
   // 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