Skip to content

Commit d337956

Browse files
committed
Try to address #71148 (comment)
1 parent 0781c7b commit d337956

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5865,10 +5865,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
58655865
if (KernelOrKext && RawTriple.isOSDarwin())
58665866
CmdArgs.push_back("-fforbid-guard-variables");
58675867

5868-
if (Args.hasArg(options::OPT_mms_bitfields) ||
5869-
Args.hasArg(options::OPT_mno_ms_bitfields)) {
5870-
if (Args.hasFlag(options::OPT_mms_bitfields, options::OPT_mno_ms_bitfields,
5871-
false))
5868+
if (Arg *A = Args.getLastArg(options::OPT_mms_bitfields,
5869+
options::OPT_mno_ms_bitfields)) {
5870+
if (A->getOption().matches(options::OPT_mms_bitfields))
58725871
CmdArgs.push_back("-fms-layout-compatibility=microsoft");
58735872
else
58745873
CmdArgs.push_back("-fms-layout-compatibility=itanium");

0 commit comments

Comments
 (0)