OSDN Git Service

[ThinLTO] Fix Windows debug failure in new iterator
authorTeresa Johnson <tejohnson@google.com>
Wed, 11 May 2016 20:46:22 +0000 (20:46 +0000)
committerTeresa Johnson <tejohnson@google.com>
Wed, 11 May 2016 20:46:22 +0000 (20:46 +0000)
commit52af31915148bfcb180d52df8d1c15cc72bfc4d9
tree1728ab6bed05df9086a82512775ee858db9044e1
parentfea2d4d86c44633ca1820dfd28da3d05338337e2
[ThinLTO] Fix Windows debug failure in new iterator

This fixes a debug assert on Windows from the new iterator
implementation added in r269059. The Windows std::vector iterator
operator== checks in debug mode that the containers being iterated over
are the same, which they may not be.

Fixed by checking that we are iterating over the same container before
comparing the container iterators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269232 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Bitcode/Writer/BitcodeWriter.cpp