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

Eric Christopher echristo at gmail.com
Fri Dec 5 08:19:35 PST 2014


On Fri Dec 05 2014 at 6:28:02 AM Jonathan Roelofs <jonathan at codesourcery.com>
wrote:

>
>
> 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.
>
>
>
Nope, it's covered earlier before we get this far :)

-eric


> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141205/a05e73d0/attachment.html>


More information about the cfe-commits mailing list