[PATCH] Fix _mhwdiv_EQ in Options.td

Gabor Ballabas gaborb at inf.u-szeged.hu
Mon Mar 24 06:41:34 PDT 2014


The _mhwdiv_EQ option doesn't really use the equal sign. This patch adds it and creates a separate _mhwdiw option without the equal sign.

http://llvm-reviews.chandlerc.com/D3149

Files:
  include/clang/Driver/Options.td
  test/Driver/arm-hwdiv.c

Index: include/clang/Driver/Options.td
===================================================================
--- include/clang/Driver/Options.td
+++ include/clang/Driver/Options.td
@@ -1352,7 +1352,8 @@
 // Double dash options, which are usually an alias for one of the previous
 // options.
 
-def _mhwdiv_EQ : Separate<["--"], "mhwdiv">, Alias<mhwdiv_EQ>;
+def _mhwdiv_EQ : Joined<["--"], "mhwdiv=">, Alias<mhwdiv_EQ>;
+def _mhwdiv : Separate<["--"], "mhwdiv">, Alias<mhwdiv_EQ>;
 def _CLASSPATH_EQ : Joined<["--"], "CLASSPATH=">, Alias<fclasspath_EQ>;
 def _CLASSPATH : Separate<["--"], "CLASSPATH">, Alias<fclasspath_EQ>;
 def _all_warnings : Flag<["--"], "all-warnings">, Alias<Wall>;
Index: test/Driver/arm-hwdiv.c
===================================================================
--- test/Driver/arm-hwdiv.c
+++ test/Driver/arm-hwdiv.c
@@ -37,3 +37,8 @@
 // CHECK-ALT: "-target-feature" "+hwdiv-arm"
 // CHECK-ALT: "-target-feature" "-hwdiv"
 
+// RUN: %clang -### -target arm %s --mhwdiv=arm -o %t.o 2>&1 \
+// RUN:   | FileCheck --check-prefix=CHECK-ALT-EQ %s
+// CHECK-ALT-EQ: "-target-feature" "+hwdiv-arm"
+// CHECK-ALT-EQ: "-target-feature" "-hwdiv"
+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3149.1.patch
Type: text/x-patch
Size: 1165 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140324/3ee50b49/attachment.bin>


More information about the cfe-commits mailing list