[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

Matt Beaumont-Gay matthewbg at google.com
Wed Nov 21 15:46:37 PST 2012


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?

> +      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");
>  }



More information about the cfe-commits mailing list