]> granicus.if.org Git - llvm/commitdiff
Fix builbots after r364427.
authorGreg Clayton <clayborg@gmail.com>
Wed, 26 Jun 2019 16:22:58 +0000 (16:22 +0000)
committerGreg Clayton <clayborg@gmail.com>
Wed, 26 Jun 2019 16:22:58 +0000 (16:22 +0000)
I was using an iterator that was equal to the end of a collection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364447 91177308-0d34-0410-b5e6-96231b3b80d8

lib/DebugInfo/GSYM/Range.cpp

index fdf4c2e6542f1dc17f918028f3d31af7ebcb40ee..bd10067013f8aeb02d6832284bf4dc61d62502ef 100644 (file)
@@ -32,7 +32,7 @@ void AddressRanges::insert(const AddressRange &Range) {
       // Now check if the previous range intersects with the next range since
       // the previous range was combined. If so, combine them and remove the
       // next range.
-      if (PrevIter->intersect(*Iter))
+      if (Iter != End && PrevIter->intersect(*Iter))
         Ranges.erase(Iter);
       return;
     }