Fix use of CompEnd predicate to be standards conforming
authorJohn Wiegley <johnw@boostpro.com>
Fri, 11 Mar 2011 08:54:34 +0000 (08:54 +0000)
committerJohn Wiegley <johnw@boostpro.com>
Fri, 11 Mar 2011 08:54:34 +0000 (08:54 +0000)
commit6fd2472b1b2d8f6a64b38874cbca95d3578e16a4
tree83a05ed02ec8efa0571f9c1a0a4e7e81f5af90a8
parent592ca3fda918c2066d9d78ed360e5fd69066fda7
Fix use of CompEnd predicate to be standards conforming

The existing CompEnd predicate does not define a strict weak order as required
by the C++03 standard; therefore, its use as a predicate to std::upper_bound
is invalid. For a discussion of this issue, see
http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#270

This patch replaces the asymmetrical comparison with an iterator adaptor that
achieves the same effect while being strictly standard-conforming by ensuring
an apples-to-apples comparison.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127462 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/LiveInterval.cpp