r179487 - [Mips] Follow-up to r179481. Reduce code duplication. Use
Simon Atanasyan
simon at atanasyan.com
Sun Apr 14 07:07:36 PDT 2013
Author: atanasyan
Date: Sun Apr 14 09:07:36 2013
New Revision: 179487
URL: http://llvm.org/viewvc/llvm-project?rev=179487&view=rev
Log:
[Mips] Follow-up to r179481. Reduce code duplication. Use
AddTargetFeature() routine to handle -msingle-float / -mdouble-float
options.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=179487&r1=179486&r2=179487&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Sun Apr 14 09:07:36 2013
@@ -984,16 +984,9 @@ void Clang::AddMIPSTargetArgs(const ArgL
CmdArgs.push_back("hard");
}
- if (Arg *A = Args.getLastArg(options::OPT_msingle_float,
- options::OPT_mdouble_float)) {
- if (A->getOption().matches(options::OPT_msingle_float)) {
- // Restrict the use of hardware floating-point
- // instructions to 32-bit operations.
- CmdArgs.push_back("-target-feature");
- CmdArgs.push_back("+single-float");
- }
- }
-
+ AddTargetFeature(Args, CmdArgs,
+ options::OPT_msingle_float, options::OPT_mdouble_float,
+ "single-float");
AddTargetFeature(Args, CmdArgs,
options::OPT_mips16, options::OPT_mno_mips16,
"mips16");
More information about the cfe-commits
mailing list