[PATCH] Fix code duplication in lib/Driver/Tools.cpp

evgeny illumsoft.org at gmail.com
Mon Feb 25 13:27:38 PST 2013


Hi Dmitri,

Do not apply the patch if you find it does not conform to rules,
or doesn't give much gain.

Feel free to apply changes in the way you deem necessary.
I need working clang, not my name in commits' history :-)

Thank you also for giving me starting point!

Sunday, February 24, 2013, 5:40:28 PM, you wrote:

> On Sun, Feb 24, 2013 at 9:25 AM, evgeny <illumsoft.org at gmail.com> wrote:
>> I am interested in clang on Illumos, so I started to work on 'Find a real GCC,
>> don't hard-code versions here' as written in lib/Driver/Tools.cpp
>>
>> I think there is a code duplication in function
>> void solaris::Link::ConstructJob (the file lib/Driver/Tools.cpp)
>> please see attached patch.

> Hi Evgeny,

> This looks like a correct refactoring without changing the
> functionality.  I can certainly apply this patch, but it does not help
> much (and there's a code style issue with 'case' indentation).  Before
> you start hacking on the new implementation, it would help to add
> tests first (I don't see any Solaris or Illumos tests for the driver).
>  Please take a look at test/Driver/freebsd.c and
> test/Driver/Inputs/basic_freebsd_tree/ for an example.

> Dmitri




-- 
Best regards,
 evgeny                            mailto:illumsoft.org at gmail.com




More information about the cfe-commits mailing list