r307152 - [driver][mips] Use AddTargetFeature to check arguments and add feature flags. NFC
Simon Atanasyan via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 5 05:57:37 PDT 2017
Author: atanasyan
Date: Wed Jul 5 05:57:37 2017
New Revision: 307152
URL: http://llvm.org/viewvc/llvm-project?rev=307152&view=rev
Log:
[driver][mips] Use AddTargetFeature to check arguments and add feature flags. NFC
Modified:
cfe/trunk/lib/Driver/ToolChains/Arch/Mips.cpp
Modified: cfe/trunk/lib/Driver/ToolChains/Arch/Mips.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Arch/Mips.cpp?rev=307152&r1=307151&r2=307152&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Arch/Mips.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Arch/Mips.cpp Wed Jul 5 05:57:37 2017
@@ -297,13 +297,8 @@ void mips::getMIPSTargetFeatures(const D
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) {
More information about the cfe-commits
mailing list