dsanders added inline comments. ================ Comment at: lib/Basic/Targets.cpp:6986 @@ +6985,3 @@ + : TargetInfo(Triple), CPU((getTriple().getArch() == llvm::Triple::mips || + getTriple().getArch() == llvm::Triple::mipsel) + ? "mips32r2" ---------------- 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.
================ Comment at: lib/Basic/Targets.cpp:7006 @@ +7005,3 @@ + MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 32; + } else if (getTriple().getArch() == llvm::Triple::mips64 || + getTriple().getArch() == llvm::Triple::mips64el) { ---------------- atanasyan wrote: > Can we use just `else` here? Sure http://reviews.llvm.org/D20678 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits