[cfe-commits] r156942 - in /cfe/trunk: include/clang/Driver/CC1Options.td include/clang/Driver/Options.td lib/Driver/Tools.cpp test/Driver/flags.c
Chad Rosier
mcrosier at apple.com
Wed May 16 13:40:10 PDT 2012
Author: mcrosier
Date: Wed May 16 15:40:09 2012
New Revision: 156942
URL: http://llvm.org/viewvc/llvm-project?rev=156942&view=rev
Log:
[driver] Allow the driver to directly accept the -no-implicit-float option, so that the
generation of implicit floating point instructions can be disable for ARM.
rdar://11409142
Modified:
cfe/trunk/include/clang/Driver/CC1Options.td
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/flags.c
Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=156942&r1=156941&r2=156942&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Wed May 16 15:40:09 2012
@@ -146,8 +146,6 @@
HelpText<"The string to embed in the Dwarf debug flags record.">;
def fforbid_guard_variables : Flag<"-fforbid-guard-variables">,
HelpText<"Emit an error if a C++ static local initializer would need a guard variable">;
-def no_implicit_float : Flag<"-no-implicit-float">,
- HelpText<"Don't generate implicit floating point instructions (x86-only)">;
def fdump_vtable_layouts : Flag<"-fdump-vtable-layouts">,
HelpText<"Dump the layouts of all vtables that will be emitted in a translation unit">;
def femit_coverage_notes : Flag<"-femit-coverage-notes">,
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=156942&r1=156941&r2=156942&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Wed May 16 15:40:09 2012
@@ -800,6 +800,8 @@
def msmall_data_threshold_EQ : Joined <"-msmall-data-threshold=">, Group<m_Group>;
def msoft_float : Flag<"-msoft-float">, Group<m_Group>, Flags<[CC1Option]>,
HelpText<"Use software floating point">;
+def no_implicit_float : Flag<"-no-implicit-float">, Flags<[CC1Option]>,
+ HelpText<"Don't generate implicit floating point instructions">;
def msse2 : Flag<"-msse2">, Group<m_x86_Features_Group>;
def msse3 : Flag<"-msse3">, Group<m_x86_Features_Group>;
def msse4a : Flag<"-msse4a">, Group<m_x86_Features_Group>;
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=156942&r1=156941&r2=156942&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed May 16 15:40:09 2012
@@ -755,6 +755,9 @@
if (A->getOption().matches(options::OPT_mno_global_merge))
CmdArgs.push_back("-mno-global-merge");
}
+
+ if (Args.hasArg(options::OPT_no_implicit_float))
+ CmdArgs.push_back("-no-implicit-float");
}
// Get default architecture.
Modified: cfe/trunk/test/Driver/flags.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/flags.c?rev=156942&r1=156941&r2=156942&view=diff
==============================================================================
--- cfe/trunk/test/Driver/flags.c (original)
+++ cfe/trunk/test/Driver/flags.c Wed May 16 15:40:09 2012
@@ -7,3 +7,5 @@
// 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 armv7-apple-darwin10 -### -S -no-implicit-float %s 2> %t.log
+// RUN: grep '"-no-implicit-float"' %t.log | count 1
More information about the cfe-commits
mailing list