[driver][mips] Use AddTargetFeature to check arguments and add feature flags. NFC

llvm-svn: 307152
This commit is contained in:
Simon Atanasyan 2017-07-05 12:57:37 +00:00
parent 3369438ef4
commit 6a9570c282
1 changed files with 2 additions and 7 deletions

View File

@ -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) {