forked from OSchip/llvm-project
Add support for driver option -mno-ms-bitfields.
This option is used to cancel -mms-bitfields on the command line. rdar://problem/15898553 llvm-svn: 252912
This commit is contained in:
parent
2aebdda81e
commit
0202848ad0
|
@ -1273,6 +1273,8 @@ def mmacosx_version_min_EQ : Joined<["-"], "mmacosx-version-min=">,
|
|||
Group<m_Group>, HelpText<"Set Mac OS X deployment target">;
|
||||
def mms_bitfields : Flag<["-"], "mms-bitfields">, Group<m_Group>, Flags<[CC1Option]>,
|
||||
HelpText<"Set the default structure layout to be compatible with the Microsoft compiler standard">;
|
||||
def mno_ms_bitfields : Flag<["-"], "mno-ms-bitfields">, Group<m_Group>,
|
||||
HelpText<"Do not set the default structure layout to be compatible with the Microsoft compiler standard">;
|
||||
def mstackrealign : Flag<["-"], "mstackrealign">, Group<m_Group>, Flags<[CC1Option]>,
|
||||
HelpText<"Force realign the stack at entry to every function">;
|
||||
def mstack_alignment : Joined<["-"], "mstack-alignment=">, Group<m_Group>, Flags<[CC1Option]>,
|
||||
|
|
|
@ -3713,7 +3713,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
if (KernelOrKext && getToolChain().getTriple().isOSDarwin())
|
||||
CmdArgs.push_back("-fforbid-guard-variables");
|
||||
|
||||
if (Args.hasArg(options::OPT_mms_bitfields)) {
|
||||
if (Args.hasFlag(options::OPT_mms_bitfields, options::OPT_mno_ms_bitfields,
|
||||
false)) {
|
||||
CmdArgs.push_back("-mms-bitfields");
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
// RUN: %clang -### %s 2>&1 | FileCheck %s -check-prefix=NO-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
|
||||
|
||||
// MSBITFIELDS: -mms-bitfields
|
||||
// NO-MSBITFIELDS-NOT: -mms-bitfields
|
Loading…
Reference in New Issue