]> granicus.if.org Git - clang/commitdiff
[driver] Allow the driver to directly accept the -no-implicit-float option, so that the
authorChad Rosier <mcrosier@apple.com>
Wed, 16 May 2012 20:40:09 +0000 (20:40 +0000)
committerChad Rosier <mcrosier@apple.com>
Wed, 16 May 2012 20:40:09 +0000 (20:40 +0000)
generation of implicit floating point instructions can be disable for ARM.
rdar://11409142

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156942 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/CC1Options.td
include/clang/Driver/Options.td
lib/Driver/Tools.cpp
test/Driver/flags.c

index 90933f7ce157cd9eddb5b39e6b7eba548093e4a4..8288c006871d20413c20b0d8afcdf0e6649cd80f 100644 (file)
@@ -146,8 +146,6 @@ def dwarf_debug_flags : Separate<"-dwarf-debug-flags">,
   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">,
index 62b8d3aa6c2a31821cee9022f54fbd45b98511e2..5b50485062628a9a02998172047507530d3bc63c 100644 (file)
@@ -800,6 +800,8 @@ def mrtd : Flag<"-mrtd">, Group<m_Group>, Flags<[CC1Option]>,
 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>;
index fcfee50859ef38ce9b6185cabec134a7b662617e..8845f903be8fc0cc25f6819546ea837b07b051db 100644 (file)
@@ -755,6 +755,9 @@ void Clang::AddARMTargetArgs(const ArgList &Args,
     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.
index 7a885b699b1540db464e0e5ca6236bb23ee16108..fdb3e20ca4a7b998ba7c8d16f61f4da771ed7ab4 100644 (file)
@@ -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