Skip to content

Commit

Permalink
[driver][mips] Use AddTargetFeature to check arguments and add featur…
Browse files Browse the repository at this point in the history
…e flags. NFC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307152 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
atanasyan committed Jul 5, 2017
1 parent 3bc8b20 commit 4d43c48
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/Driver/ToolChains/Arch/Mips.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,8 @@ void mips::getMIPSTargetFeatures(const Driver &D, const llvm::Triple &Triple,

AddTargetFeature(Args, Features, options::OPT_mno_odd_spreg,
options::OPT_modd_spreg, "nooddspreg");

if (Arg *A = Args.getLastArg(options::OPT_mmadd4, options::OPT_mno_madd4)) {
if (A->getOption().matches(options::OPT_mmadd4))
Features.push_back("-nomadd4");
else
Features.push_back("+nomadd4");
}
AddTargetFeature(Args, Features, options::OPT_mno_madd4, options::OPT_mmadd4,
"nomadd4");
}

mips::NanEncoding mips::getSupportedNanEncoding(StringRef &CPU) {
Expand Down

0 comments on commit 4d43c48

Please sign in to comment.