r223422 - Use isOSBinFormatMachO() instead of comparing the object format

Jonathan Roelofs jonathan at codesourcery.com
Fri Dec 5 06:28:16 PST 2014



On 12/4/14 5:22 PM, Eric Christopher wrote:
> Author: echristo
> Date: Thu Dec  4 18:22:48 2014
> New Revision: 223422
>
> URL: http://llvm.org/viewvc/llvm-project?rev=223422&view=rev
> Log:
> Use isOSBinFormatMachO() instead of comparing the object format
> against an enum.
>
...
> Modified: cfe/trunk/lib/Driver/Tools.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=223422&r1=223421&r2=223422&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Driver/Tools.cpp (original)
> +++ cfe/trunk/lib/Driver/Tools.cpp Thu Dec  4 18:22:48 2014
> @@ -772,8 +772,7 @@ void Clang::AddARMTargetArgs(const ArgLi
>       // The backend is hardwired to assume AAPCS for M-class processors, ensure
>       // the frontend matches that.
>       if (Triple.getEnvironment() == llvm::Triple::EABI ||
> -        (Triple.getOS() == llvm::Triple::UnknownOS &&
> -         Triple.getObjectFormat() == llvm::Triple::MachO) ||
> +        Triple.getOS() == llvm::Triple::UnknownOS ||
Eric, I think you forgot a 'Triple.isOSBinFormatMachO()' here.


Cheers,

Jon
>           StringRef(CPUName).startswith("cortex-m")) {
>         ABIName = "aapcs";
>       } else {
>
...
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>

-- 
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded



More information about the cfe-commits mailing list