[PATCH] D89478: AMDGPU: Make sure both cc1 and cc1as process -m[no-]code-object-v3
Yaxun Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 15 09:19:37 PDT 2020
yaxunl added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6125
+ if (Args.hasArg(options::OPT_mcode_object_v3_legacy)) {
+ D.Diag(diag::warn_drv_deprecated_arg) << "-mcode-object-v3" <<
----------------
this does not work if you have multiple options, you may need something like
```
// Get the last argument of -mwavefrontsize64 or -mno-wavefrontsize64.
if (auto *WaveArg = Args.getLastArg(options::OPT_mwavefrontsize64,
options::OPT_mno_wavefrontsize64)) {
if (WaveArg->getOption().getID() == options::OPT_mwavefrontsize64) {
} else {
}
}
```
Also better extract this part as a function and call it in two places.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89478/new/
https://reviews.llvm.org/D89478
More information about the llvm-commits
mailing list