From: Tim Northover Date: Wed, 26 Mar 2014 14:09:48 +0000 (+0000) Subject: ARM: be more flexible about how --mhwdiv is accepted. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0180d7c145e3f0317f68f3b137c73f3a78d2dd17;p=clang ARM: be more flexible about how --mhwdiv is accepted. Patch by Gabor Ballabas. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204807 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index efe9818957..94133b9dae 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -1361,7 +1361,8 @@ def working_directory_EQ : Joined<["-"], "working-directory=">, Flags<[CC1Option // Double dash options, which are usually an alias for one of the previous // options. -def _mhwdiv_EQ : Separate<["--"], "mhwdiv">, Alias; +def _mhwdiv_EQ : Joined<["--"], "mhwdiv=">, Alias; +def _mhwdiv : Separate<["--"], "mhwdiv">, Alias; def _CLASSPATH_EQ : Joined<["--"], "CLASSPATH=">, Alias; def _CLASSPATH : Separate<["--"], "CLASSPATH">, Alias; def _all_warnings : Flag<["--"], "all-warnings">, Alias; diff --git a/test/Driver/arm-hwdiv.c b/test/Driver/arm-hwdiv.c index b3617ce534..0b75948d2b 100644 --- a/test/Driver/arm-hwdiv.c +++ b/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" +