r174836 - Recognize -mno-implicit-float option for x86 as well as ARM. <rdar://13180731>
Bob Wilson
bob.wilson at apple.com
Sun Feb 10 07:25:44 PST 2013
Author: bwilson
Date: Sun Feb 10 09:25:44 2013
New Revision: 174836
URL: http://llvm.org/viewvc/llvm-project?rev=174836&view=rev
Log:
Recognize -mno-implicit-float option for x86 as well as ARM. <rdar://13180731>
For x86 targets, we've been using the -msoft-float option to control passing
the no-implicit-float option to cc1. Since the -mno-implicit-float option is
now accepted by the driver, this just makes it work for x86 the same as it
does for ARM targets.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/flags.c
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=174836&r1=174835&r2=174836&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Sun Feb 10 09:25:44 2013
@@ -1202,7 +1202,8 @@ void Clang::AddX86TargetArgs(const ArgLi
if (Args.hasFlag(options::OPT_msoft_float,
options::OPT_mno_soft_float,
- false))
+ false) ||
+ Args.hasArg(options::OPT_mno_implicit_float))
CmdArgs.push_back("-no-implicit-float");
if (const char *CPUName = getX86TargetCPU(Args, getToolChain().getTriple())) {
Modified: cfe/trunk/test/Driver/flags.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/flags.c?rev=174836&r1=174835&r2=174836&view=diff
==============================================================================
--- cfe/trunk/test/Driver/flags.c (original)
+++ cfe/trunk/test/Driver/flags.c Sun Feb 10 09:25:44 2013
@@ -7,5 +7,8 @@
// RUN: %clang -target i386-apple-darwin9 -### -S -mno-soft-float %s -msoft-float 2> %t.log
// RUN: grep '"-no-implicit-float"' %t.log
+// RUN: %clang -target i386-apple-darwin9 -### -S -mno-implicit-float %s 2> %t.log
+// RUN: grep '"-no-implicit-float"' %t.log
+
// RUN: %clang -target armv7-apple-darwin10 -### -S -mno-implicit-float %s 2> %t.log
-// RUN: grep '"-no-implicit-float"' %t.log | count 1
+// RUN: grep '"-no-implicit-float"' %t.log
More information about the cfe-commits
mailing list