atanasyan accepted this revision.
atanasyan added a reviewer: atanasyan.
atanasyan added a comment.
This revision is now accepted and ready to land.

LGTM


================
Comment at: lib/Basic/Targets.cpp:6986
@@ +6985,3 @@
+      : TargetInfo(Triple), CPU((getTriple().getArch() == llvm::Triple::mips ||
+                                 getTriple().getArch() == llvm::Triple::mipsel)
+                                    ? "mips32r2"
----------------
dsanders wrote:
> atanasyan wrote:
> > What do you think about creation a static function and using it to simplify 
> > this and similar conditions?
> > 
> > ```
> > static bool is32BitTriple(const llvm::Triple &Triple) {
> >   return Triple.getArch() == llvm::Triple::mips || Triple.getArch() == 
> > llvm::Triple::mipsel;
> > }
> > ```
> I'm happy to add one if you want it but I'm currently finishing a patch that 
> removes most of them in favour of ABI checks. The only one I think should 
> remain as an Arch check is the one for MipsTargetInfo::ABI. Even that one is 
> incorrect on our buildbots which detect as mips64-linux-gnu but should 
> default to O32.
Agreed. In that case the separate function is redundant.


http://reviews.llvm.org/D20678



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to