Skip to content

Commit 6fa31fd

Browse files
committed
Remove the addLTOOptions as it is unrelated to the purpose of this PR.
1 parent 44fdeb9 commit 6fa31fd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

clang/lib/Driver/ToolChains/CommonArgs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1352,7 +1352,7 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args,
13521352
Args.MakeArgString("--thinlto-remote-compiler=" +
13531353
Twine(ToolChain.getDriver().getClangProgramPath())));
13541354

1355-
for (auto &A : Args.getAllArgValues(options::OPT_Xthinlto_distributor_EQ))
1355+
for (auto A : Args.getAllArgValues(options::OPT_Xthinlto_distributor_EQ))
13561356
CmdArgs.push_back(Args.MakeArgString("--thinlto-distributor-arg=" + A));
13571357
}
13581358
}

clang/lib/Driver/ToolChains/PS4CPU.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,13 +344,14 @@ void tools::PS5cpu::Linker::ConstructJob(Compilation &C, const JobAction &JA,
344344
// pass LTO options to ensure proper codegen, metadata production, etc if
345345
// LTO indeed occurs.
346346

347-
if (Arg *A = Args.getLastArg(options::OPT_fthinlto_distributor_EQ)) {
347+
if (const Arg *A = Args.getLastArg(options::OPT_fthinlto_distributor_EQ)) {
348348
CmdArgs.push_back(
349349
Args.MakeArgString("--thinlto-distributor=" + Twine(A->getValue())));
350350
CmdArgs.push_back(Args.MakeArgString("--thinlto-remote-compiler=" +
351351
Twine(D.getClangProgramPath())));
352352

353-
for (auto &A : Args.getAllArgValues(options::OPT_Xthinlto_distributor_EQ))
353+
for (const auto &A :
354+
Args.getAllArgValues(options::OPT_Xthinlto_distributor_EQ))
354355
CmdArgs.push_back(Args.MakeArgString("--thinlto-distributor-arg=" + A));
355356
}
356357

0 commit comments

Comments
 (0)