dsanders added subscribers: rengolin, joerg. dsanders added a comment. +Renato and Joerg
I was going to say I think it's ok and the optimizer should be smart enough to factor out the common IsMips check but I've just realized there may be a better way. The current code is using an else after an (implicit) continue. If we made that continue explicit, we could make this code a bit neater and have a place to add target specific options. I'm thinking something like: for (...) { ... auto Arch = C.getDefaultToolChain().getArch(); if (C.getDefaultToolChain().getArch() == llvm::Triple::mips || C.getDefaultToolChain().getArch() == llvm::Triple::mipsel || C.getDefaultToolChain().getArch() == llvm::Triple::mips64 || C.getDefaultToolChain().getArch() == llvm::Triple::mips64el) if (mips::CollectArgsForIntegratedAssembler(...) continue; if (Value == "-force_cpusubtype_ALL") continue; ... D.Diag(diag::err_drv_unsupported_option_argument) << A->getOption().getName() << Value; } Thoughts? http://reviews.llvm.org/D13100 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits