[PATCH] [mips] Don't propagate -mfpxx by default if soft/single float were also set.

Daniel Sanders daniel.sanders at imgtec.com
Fri Jun 12 01:47:58 PDT 2015


LGTM with a shouldUseFPXX() or similar as described below.


================
Comment at: lib/Driver/Tools.cpp:5778-5782
@@ -5776,1 +5777,7 @@
 
+  // FPXX shouldn't be on by default if -msingle-float is present.
+  if (Arg *A = Args.getLastArg(options::OPT_msingle_float,
+                               options::OPT_mdouble_float))
+    if (A->getOption().matches(options::OPT_msingle_float))
+      return false;
+
----------------
While the effect is functionally correct, this bit is inconsistent with the question 'Is FPXX enabled by default?'. When these options are given it's still the default but the options overrule it. Could you hoist this logic out into a function named something like shouldUseFPXX()?.

http://reviews.llvm.org/D10387

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list