forked from OSchip/llvm-project
[clang] Enable -mms-bitfields by default for mingw targets
This matches GCC, which enabled -mms-bitfields by default for mingw targets in 4.7 [1]. [1] https://www.gnu.org/software/gcc/gcc-4.7/changes.html Differential Revision: https://reviews.llvm.org/D81795
This commit is contained in:
parent
7b3fe96992
commit
e3fd9dc973
|
@ -4679,7 +4679,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
CmdArgs.push_back("-fforbid-guard-variables");
|
CmdArgs.push_back("-fforbid-guard-variables");
|
||||||
|
|
||||||
if (Args.hasFlag(options::OPT_mms_bitfields, options::OPT_mno_ms_bitfields,
|
if (Args.hasFlag(options::OPT_mms_bitfields, options::OPT_mno_ms_bitfields,
|
||||||
false)) {
|
Triple.isWindowsGNUEnvironment())) {
|
||||||
CmdArgs.push_back("-mms-bitfields");
|
CmdArgs.push_back("-mms-bitfields");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
// RUN: %clang -### %s 2>&1 | FileCheck %s -check-prefix=NO-MSBITFIELDS
|
// RUN: %clang -### -target x86_64-linux-gnu %s 2>&1 | FileCheck %s -check-prefix=NO-MSBITFIELDS
|
||||||
|
// RUN: %clang -### -target x86_64-windows-gnu %s 2>&1 | FileCheck %s -check-prefix=MSBITFIELDS
|
||||||
// RUN: %clang -### -mno-ms-bitfields -mms-bitfields %s 2>&1 | FileCheck %s -check-prefix=MSBITFIELDS
|
// RUN: %clang -### -mno-ms-bitfields -mms-bitfields %s 2>&1 | FileCheck %s -check-prefix=MSBITFIELDS
|
||||||
// RUN: %clang -### -mms-bitfields -mno-ms-bitfields %s 2>&1 | FileCheck %s -check-prefix=NO-MSBITFIELDS
|
// RUN: %clang -### -mms-bitfields -mno-ms-bitfields %s 2>&1 | FileCheck %s -check-prefix=NO-MSBITFIELDS
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue