diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-16 19:46:09 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-16 19:46:09 +0000 |
commit | 460ee0fd19b13ba4c1410e43d8d253bf34673817 (patch) | |
tree | 1bc29300e4f4c4021d517ba477d43e8584bc8419 /include/llvm/ADT/IntervalMap.h | |
parent | 8a28f2137978d141402883815a3550b02ea5b1c8 (diff) | |
download | external_llvm-460ee0fd19b13ba4c1410e43d8d253bf34673817.zip external_llvm-460ee0fd19b13ba4c1410e43d8d253bf34673817.tar.gz external_llvm-460ee0fd19b13ba4c1410e43d8d253bf34673817.tar.bz2 |
Add basic test exposing many bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121995 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/IntervalMap.h')
-rw-r--r-- | include/llvm/ADT/IntervalMap.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/llvm/ADT/IntervalMap.h b/include/llvm/ADT/IntervalMap.h index ae79e84..86652f5 100644 --- a/include/llvm/ADT/IntervalMap.h +++ b/include/llvm/ADT/IntervalMap.h @@ -2036,11 +2036,11 @@ class IntervalMapOverlaps { for (;;) { // Make a.end > b.start. posA.advanceTo(posB.start()); - if (!posA.valid() || !Traits::stopLess(posB.end(), posA.start())) + if (!posA.valid() || !Traits::stopLess(posB.stop(), posA.start())) return; // Make b.end > a.start. posB.advanceTo(posA.start()); - if (!posB.valid() || !Traits::stopLess(posA.end(), posB.start())) + if (!posB.valid() || !Traits::stopLess(posA.stop(), posB.start())) return; } } @@ -2068,11 +2068,11 @@ public: /// skipA - Move to the next overlap that doesn't involve a(). void skipA() { ++posA; - if (!posA.valid() || !Traits::stopLess(posB.end(), posA.start())) + if (!posA.valid() || !Traits::stopLess(posB.stop(), posA.start())) return; // Second half-loop of advance(). posB.advanceTo(posA.start()); - if (!posB.valid() || !Traits::stopLess(posA.end(), posB.start())) + if (!posB.valid() || !Traits::stopLess(posA.stop(), posB.start())) return ; advance(); } @@ -2080,7 +2080,7 @@ public: /// skipB - Move to the next overlap that doesn't involve b(). void skipB() { ++posB; - if (!posB.valid() || !Traits::stopLess(posA.end(), posB.start())) + if (!posB.valid() || !Traits::stopLess(posA.stop(), posB.start())) return; advance(); } @@ -2088,7 +2088,7 @@ public: /// Preincrement - Move to the next overlap. IntervalMapOverlaps &operator++() { // Bump the iterator that ends first. The other one may have more overlaps. - if (Traits::startLess(posB.end(), posA.end())) + if (Traits::startLess(posB.stop(), posA.stop())) skipB(); else skipA(); |