[PATCH] D134671: [Driver] Prevent Mips specific code from claiming -mabi argument on other targets.
Craig Topper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 26 16:29:30 PDT 2022
craig.topper added inline comments.
================
Comment at: clang/lib/Driver/Driver.cpp:637
// accordingly to provided ABI name.
- A = Args.getLastArg(options::OPT_mabi_EQ);
+ A = Args.getLastArgNoClaim(options::OPT_mabi_EQ);
if (A && Target.isMIPS()) {
----------------
arichardson wrote:
> Would it make more sense to move this into the if? It makes the diff bigger since everything inside has to be reindented, but only querying the flag if target is MIPS seems cleaner to me than the noclaim+a->claim approach.
I wasn't sure if I should expect someone might want to add another target. I'll change it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134671/new/
https://reviews.llvm.org/D134671
More information about the cfe-commits
mailing list