[clang] [clang] Implement gcc_struct attribute on Itanium targets (PR #71148)
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 25 14:11:54 PST 2025
================
@@ -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) ||
----------------
MaskRay wrote:
If the LangOption default varies across targets, and you want to forward the driver option to clang -cc1,
```
if (auto *A = Args.getLastArg(..., ...)) {
if (A->matches(...)) CmdArgs.push_back...
else CmdArgs.push_back...
}
```
https://github.com/llvm/llvm-project/pull/71148
More information about the cfe-commits
mailing list