[cfe-commits] r168473 - in /cfe/trunk: include/clang/Driver/CC1Options.td include/clang/Driver/Options.td include/clang/Driver/ToolChain.h lib/Driver/ToolChain.cpp lib/Driver/ToolChains.cpp lib/Driver/ToolChains.h lib/Driver/Tools.cpp test/Driver/constructors.c

Chandler Carruth chandlerc at gmail.com
Wed Nov 21 15:50:30 PST 2012


On Wed, Nov 21, 2012 at 3:46 PM, Matt Beaumont-Gay <matthewbg at google.com> wrote:
> On Wed, Nov 21, 2012 at 3:40 PM, Chandler Carruth <chandlerc at gmail.com> wrote:
>> Modified: cfe/trunk/lib/Driver/ToolChains.cpp
>> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=168473&r1=168472&r2=168473&view=diff
>> ==============================================================================
>> --- cfe/trunk/lib/Driver/ToolChains.cpp (original)
>> +++ cfe/trunk/lib/Driver/ToolChains.cpp Wed Nov 21 17:40:23 2012
>> @@ -2230,10 +2230,15 @@
>>    return *T;
>>  }
>>
>> -void Linux::addClangTargetOptions(ArgStringList &CC1Args) const {
>> +void Linux::addClangTargetOptions(const ArgList &DriverArgs,
>> +                                  ArgStringList &CC1Args) const {
>>    const Generic_GCC::GCCVersion &V = GCCInstallation.getVersion();
>> -  if (V >= Generic_GCC::GCCVersion::Parse("4.7.0") ||
>> -      getTriple().getEnvironment() == llvm::Triple::Android)
>> +  bool UseInitArrayDefault
>> +    = V >= Generic_GCC::GCCVersion::Parse("4.7.0") ||
>
> Is the preferred style really to put the '=' on the next line like this?

It's a common style, I think trying to distinguish between an operator
like == and the initializer for a variable...

I don't actually have any preference here. Doug once told me to do it
like this, and I've done so as consistently as I can since...

>
>> +      getTriple().getEnvironment() == llvm::Triple::Android;
>> +  if (DriverArgs.hasFlag(options::OPT_fuse_init_array,
>> +                         options::OPT_fno_use_init_array,
>> +                         UseInitArrayDefault))
>>      CC1Args.push_back("-fuse-init-array");
>>  }
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list