clang-cl: Expose the -m32 and -m64 command-line options

And add a test to check that they work.

llvm-svn: 192402
This commit is contained in:
Hans Wennborg 2013-10-10 22:36:20 +00:00
parent b916e84672
commit 65a008683f
2 changed files with 9 additions and 2 deletions

View File

@ -917,12 +917,12 @@ def lazy__framework : Separate<["-"], "lazy_framework">, Flags<[LinkerInput]>;
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>;

View File

@ -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() { }