r192402 - clang-cl: Expose the -m32 and -m64 command-line options
Hans Wennborg
hans at hanshq.net
Thu Oct 10 15:36:20 PDT 2013
Author: hans
Date: Thu Oct 10 17:36:20 2013
New Revision: 192402
URL: http://llvm.org/viewvc/llvm-project?rev=192402&view=rev
Log:
clang-cl: Expose the -m32 and -m64 command-line options
And add a test to check that they work.
Modified:
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/test/Driver/cl-options.c
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=192402&r1=192401&r2=192402&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Thu Oct 10 17:36:20 2013
@@ -917,12 +917,12 @@ def lazy__framework : Separate<["-"], "l
def lazy__library : Separate<["-"], "lazy_library">, Flags<[LinkerInput]>;
def EL : Flag<["-"], "EL">, Flags<[DriverOption]>;
def EB : Flag<["-"], "EB">, Flags<[DriverOption]>;
-def m32 : Flag<["-"], "m32">, Group<m_Group>, Flags<[DriverOption]>;
+def m32 : Flag<["-"], "m32">, Group<m_Group>, Flags<[DriverOption, CoreOption]>;
def mqdsp6_compat : Flag<["-"], "mqdsp6-compat">, Group<m_Group>, Flags<[DriverOption,CC1Option]>,
HelpText<"Enable hexagon-qdsp6 backward compatibility">;
def m3dnowa : Flag<["-"], "m3dnowa">, Group<m_x86_Features_Group>;
def m3dnow : Flag<["-"], "m3dnow">, Group<m_x86_Features_Group>;
-def m64 : Flag<["-"], "m64">, Group<m_Group>, Flags<[DriverOption]>;
+def m64 : Flag<["-"], "m64">, Group<m_Group>, Flags<[DriverOption, CoreOption]>;
def mabi_EQ : Joined<["-"], "mabi=">, Group<m_Group>;
def march_EQ : Joined<["-"], "march=">, Group<m_Group>;
def maltivec : Flag<["-"], "maltivec">, Alias<faltivec>;
Modified: cfe/trunk/test/Driver/cl-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=192402&r1=192401&r2=192402&view=diff
==============================================================================
--- cfe/trunk/test/Driver/cl-options.c (original)
+++ cfe/trunk/test/Driver/cl-options.c Thu Oct 10 17:36:20 2013
@@ -129,4 +129,11 @@
// Xclang: "-cc1"
// Xclang: "hellocc1"
+// We support -m32 and -m64.
+// RUN: %clang_cl -Xclang -target -Xclang x86_64-pc-win32 -m32 -### -- %s 2>&1 | FileCheck -check-prefix=M32 %s
+// M32: "-triple" "i{{[0-9]}}86-{{.*}}"
+// RUN: %clang_cl -Xclang -target -Xclang i386-pc-win32 -m64 -### -- %s 2>&1 | FileCheck -check-prefix=M64 %s
+// M64: "-triple" "{{[^-]+}}64-{{.*}}"
+
+
void f() { }
More information about the cfe-commits
mailing list