[llvm-commits] [llvm] r127245 - /llvm/trunk/lib/CodeGen/LiveInterval.cpp
Óscar Fuentes
ofv at wanadoo.es
Tue Mar 8 11:25:00 PST 2011
Jakob Stoklund Olesen <stoklund at 2pi.dk> writes:
>> 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?
Ugh! You are right, of course. Mistakes like this happen when you work
with an attention-demanding 2 year old jumping around. I'll revert the
change ASAP.
Do you think that the patch posted by the bug reporter is correct?
More information about the llvm-commits
mailing list