r312434 - Driver: move `-mfpmath` into FP Options (NFC)

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 2 21:46:57 PDT 2017


Author: compnerd
Date: Sat Sep  2 21:46:57 2017
New Revision: 312434

URL: http://llvm.org/viewvc/llvm-project?rev=312434&view=rev
Log:
Driver: move `-mfpmath` into FP Options (NFC)

Move the `-mfpmath` handling with the rest of the floating point
optimization flags.

Modified:
    cfe/trunk/lib/Driver/ToolChains/Clang.cpp

Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=312434&r1=312433&r2=312434&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Clang.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Clang.cpp Sat Sep  2 21:46:57 2017
@@ -2125,6 +2125,11 @@ static void RenderFloatingPointOptions(c
   // Handle __FINITE_MATH_ONLY__ similarly.
   if (!HonorINFs && !HonorNaNs)
     CmdArgs.push_back("-ffinite-math-only");
+
+  if (const Arg *A = Args.getLastArg(options::OPT_mfpmath_EQ)) {
+    CmdArgs.push_back("-mfpmath");
+    CmdArgs.push_back(A->getValue());
+  }
 }
 
 static void RenderAnalyzerOptions(const ArgList &Args, ArgStringList &CmdArgs,
@@ -3206,11 +3211,6 @@ void Clang::ConstructJob(Compilation &C,
     CmdArgs.push_back(Args.MakeArgString(CPU));
   }
 
-  if (const Arg *A = Args.getLastArg(options::OPT_mfpmath_EQ)) {
-    CmdArgs.push_back("-mfpmath");
-    CmdArgs.push_back(A->getValue());
-  }
-
   // Add the target features
   getTargetFeatures(getToolChain(), Triple, Args, CmdArgs, false);
 




More information about the cfe-commits mailing list