This is a follow on to post review comments on revision r248276.
Details
Details
- Reviewers
dsanders vkalintiris - Commits
- rG3d5e5680e2a7: [mips] Separated mips specific -Wa options, so that they are not checked on…
rC251430: [mips] Separated mips specific -Wa options, so that they are not checked on…
rL251430: [mips] Separated mips specific -Wa options, so that they are not checked on…
Diff Detail
Diff Detail
Event Timeline
Comment Actions
+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?