================
@@ -6113,9 +6113,13 @@ void Clang::ConstructJob(Compilation &C, const JobAction
&JA,
if (KernelOrKext && RawTriple.isOSDarwin())
CmdArgs.push_back("-fforbid-guard-variables");
- if (Args.hasFlag(options::OPT_mms_bitfields, options::OPT_mno_ms_bitfields,
- Triple.isWindowsGNUEnvironment())) {
- CmdArgs.push_back("-mms-bitfields");
+ if (Args.hasArg(options::OPT_mms_bitfields) ||
----------------
mstorsjo wrote:
@MaskRay - so instead of the current code which does
```c++
if (Args.hasArg(options::OPT_mms_bitfields) ||
Args.hasArg(options::OPT_mno_ms_bitfields)) {
if (Args.hasFlag(options::OPT_mms_bitfields, options::OPT_mno_ms_bitfields,
false))
CmdArgs.push_back("-fms-layout-compatibility=microsoft");
else
CmdArgs.push_back("-fms-layout-compatibility=itanium");
}
```
we should do this instead:
```c++
if (Arg *A = Args.getLastArg(options::OPT_mms_bitfields,
options::OPT_mno_ms_bitfields)) {
if (A->getOption().matches(options::OPT_mms_bitfields))
CmdArgs.push_back("-fms-layout-compatibility=microsoft");
else
CmdArgs.push_back("-fms-layout-compatibility=itanium");
}
```
If that's the only remaining issue here, I think we should try to pick this up
and get this merged, instead of leaving it waiting for another couple of
years...
https://github.com/llvm/llvm-project/pull/71148
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits