[cfe-commits] r81470 - /cfe/trunk/lib/Driver/Tools.cpp

Daniel Dunbar daniel at zuster.org
Thu Sep 10 15:59:57 PDT 2009


Author: ddunbar
Date: Thu Sep 10 17:59:57 2009
New Revision: 81470

URL: http://llvm.org/viewvc/llvm-project?rev=81470&view=rev
Log:
Move X86 handling of -m[no-]soft-float and -m[no-]red-zone into AddX86TargetArgs.

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=81470&r1=81469&r2=81470&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Sep 10 17:59:57 2009
@@ -319,6 +319,22 @@
 
 void Clang::AddX86TargetArgs(const ArgList &Args,
                              ArgStringList &CmdArgs) const {
+  // FIXME: This needs to change to use a clang-cc option, and set the attribute
+  // on functions.
+  if (!Args.hasFlag(options::OPT_mred_zone,
+                    options::OPT_mno_red_zone,
+                    true) ||
+      Args.hasArg(options::OPT_mkernel) ||
+      Args.hasArg(options::OPT_fapple_kext))
+    CmdArgs.push_back("--disable-red-zone");
+
+  // FIXME: This needs to change to use a clang-cc option, and set the attribute
+  // on functions.
+  if (Args.hasFlag(options::OPT_msoft_float,
+                   options::OPT_mno_soft_float,
+                   false))
+    CmdArgs.push_back("--no-implicit-float");
+
   if (const Arg *A = Args.getLastArg(options::OPT_march_EQ)) {
     // FIXME: We may need some translation here from the options gcc takes to
     // names the LLVM backend understand?
@@ -521,16 +537,6 @@
     CmdArgs.push_back("--unwind-tables=1");
   else
     CmdArgs.push_back("--unwind-tables=0");
-  if (!Args.hasFlag(options::OPT_mred_zone,
-                    options::OPT_mno_red_zone,
-                    true) ||
-      Args.hasArg(options::OPT_mkernel) ||
-      Args.hasArg(options::OPT_fapple_kext))
-    CmdArgs.push_back("--disable-red-zone");
-  if (Args.hasFlag(options::OPT_msoft_float,
-                   options::OPT_mno_soft_float,
-                   false))
-    CmdArgs.push_back("--no-implicit-float");
 
   // FIXME: Handle -mtune=.
   (void) Args.hasArg(options::OPT_mtune_EQ);





More information about the cfe-commits mailing list