================ @@ -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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits