[cfe-commits] [PATCH] Generic_GCC::GCCVersion comparison fix

Simon Atanasyan satanasyan at mips.com
Tue Dec 18 21:34:12 PST 2012


Hi Chandler,

On Thu, Dec 13, 2012 at 9:17 AM, Rafael EspĂ­ndola
<rafael.espindola at gmail.com> wrote:
> On 12 December 2012 06:32, Simon Atanasyan <satanasyan at mips.com> wrote:
>> Suppose we have two GCCVersion objects A and B both represent say 4.7.
>> In that case A < B is true as well as B < A because right operand has
>> no patch number in both cases. Consequently A <= B and B <= A are both
>> false.
>>
>> Is this intended behavior? If not, please review the patch fixes this
>> problem. Unfortunately I cannot figure out how to write a test for
>> that case.
>
> LGTM.
>
> I can get the current code to fail if I, for example, create a
> test/Driver/Inputs/debian_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu/4.5/32/crtbegin.o.
> I am not sure if that is a valid directory layout or not, so we should
> wait on Chandler for the test, but the fix itself is OK.

Do you have any comments on that?

--
Simon




More information about the cfe-commits mailing list