diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-03 19:02:00 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-03 19:02:00 +0000 |
commit | e7ed7b6cfd361d15e627eed5b8baddee4e7faf0b (patch) | |
tree | ab642c05cebabb5c55facca2ef9fa91593b5f13c /llvm/lib/Support/IntervalMap.cpp | |
parent | 0e05e24e9c770a446f1ad5a7f42eea89127cb297 (diff) | |
download | bcm5719-llvm-e7ed7b6cfd361d15e627eed5b8baddee4e7faf0b.tar.gz bcm5719-llvm-e7ed7b6cfd361d15e627eed5b8baddee4e7faf0b.zip |
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.
llvm-svn: 120829
Diffstat (limited to 'llvm/lib/Support/IntervalMap.cpp')
-rw-r--r-- | llvm/lib/Support/IntervalMap.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Support/IntervalMap.cpp b/llvm/lib/Support/IntervalMap.cpp index 6f39b183a1c..4dfcc404ca4 100644 --- a/llvm/lib/Support/IntervalMap.cpp +++ b/llvm/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 |