[clang] [llvm] [PowerPC] add TargetParser for PPC target (PR #97541)
David Tenty via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 3 08:36:17 PDT 2024
================
@@ -1963,8 +1964,11 @@ void Clang::AddPPCTargetArgs(const ArgList &Args,
const llvm::Triple &T = getToolChain().getTriple();
if (Args.getLastArg(options::OPT_mtune_EQ)) {
CmdArgs.push_back("-tune-cpu");
- std::string CPU = ppc::getPPCTuneCPU(Args, T);
- CmdArgs.push_back(Args.MakeArgString(CPU));
+ StringRef CPU = "";
+ if (Arg *A = Args.getLastArg(clang::driver::options::OPT_mtune_EQ))
----------------
daltenty wrote:
nit: You can get just do this assignment in the outer if condition, to avoid calling `Args.getLastArg` twice with the exact same arguments. Then just check the result here:
```suggestion
if (A)
```
https://github.com/llvm/llvm-project/pull/97541
More information about the cfe-commits
mailing list