[llvm-commits] [llvm] r127245 - /llvm/trunk/lib/CodeGen/LiveInterval.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Tue Mar 8 11:07:02 PST 2011


On Mar 8, 2011, at 5:52 AM, Oscar Fuentes wrote:

> Author: ofv
> Date: Tue Mar  8 07:52:07 2011
> New Revision: 127245
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=127245&view=rev
> Log:
> Make a comparator's argument `const'. This fixes the build for MSVC 9.
> 
> Modified:
>    llvm/trunk/lib/CodeGen/LiveInterval.cpp
> 
> Modified: llvm/trunk/lib/CodeGen/LiveInterval.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveInterval.cpp?rev=127245&r1=127244&r2=127245&view=diff
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/LiveInterval.cpp (original)
> +++ llvm/trunk/lib/CodeGen/LiveInterval.cpp Tue Mar  8 07:52:07 2011
> @@ -36,7 +36,7 @@
>   bool operator()(SlotIndex A, const LiveRange &B) const {
>     return A < B.end;
>   }
> -  bool operator()(const LiveRange &A, SlotIndex B) const {
> +  bool operator()(const LiveRange &A, const SlotIndex B) const {
>     return A.end < B;
>   }
> };

Huh? A const by-value argument looks like a bug to me. What was the error?

/jakob





More information about the llvm-commits mailing list