[llvm-commits] [cfe-commits] [PATCH] Add configuration of CLANG_VENDOR, VENDOR_GCC_VERISON

ronl ronl at codeaurora.org
Mon Aug 27 11:28:53 PDT 2012


Hi Sebastian,
The change to the ordering  of the  is to be consistent with how gcc
behaves.
Some products use a command like the following to determine version info
   $ gcc -v  2>&1 | tail -1
   gcc version 4.4.0 (GCC)


Change is documented as: 
The -v and --version command line options will print the version # last,
    after the thread model and target.
    

The other two items regarding braces, and spaces will be addressed in a
revision.

Thanks,
Ron
-----Original Message-----
From: Sebastian Pop [mailto:spop at codeaurora.org] 
Sent: Monday, August 27, 2012 1:19 PM
To: ronl at codeaurora.org
Cc: llvm-commits at cs.uiuc.edu; cfe-commits at cs.uiuc.edu
Subject: Re: [cfe-commits] [PATCH] Add configuration of CLANG_VENDOR,
VENDOR_GCC_VERISON

Hi Ron,

> @@ -658,7 +659,6 @@ void Driver::PrintHelp(bool ShowHidden) const {  
> void Driver::PrintVersion(const Compilation &C, raw_ostream &OS) const {
>    // FIXME: The following handlers should use a callback mechanism, we
don't
>    // know what the client would like to do.
> -  OS << getClangFullVersion() << '\n';
>    const ToolChain &TC = C.getDefaultToolChain();
>    OS << "Target: " << TC.getTripleString() << '\n';
>
> @@ -666,6 +666,8 @@ void Driver::PrintVersion(const Compilation &C,
raw_ostream &OS) const {
>    //
>    // FIXME: Implement correctly.
>    OS << "Thread model: " << "posix" << '\n';
> +
> +  OS << getClangFullVersion() << '\n';
>  }
>
>  /// PrintDiagnosticCategories - Implement the 
> --print-diagnostic-categories
>

I don't see a good reason to change the order in which getClangFullVersion
is printed.  Could you explain why you changed this?  Otherwise please
revert.

> @@ -718,6 +725,9 @@ bool Driver::HandleImmediateArgs(const Compilation &C)
{
>        C.getArgs().hasArg(options::OPT__HASH_HASH_HASH)) {
>      PrintVersion(C, llvm::errs());
>      SuppressMissingInputWarning = true;
> +    if (C.getArgs().hasArg(options::OPT_v)) {
> +      SuppressMissingOptionsWarning = true;
> +    }
>    }

You don't need braces on single statement ifs.


> +dnl Vendor defined Version , GCC Version, and Name

Please remove the space before comma.

Thanks,
Sebastian
--
Qualcomm Innovation Center, Inc is a member of Code Aurora Forum




More information about the llvm-commits mailing list