[clang] [Clang][Driver][NFC] Capture -foffload-lto Arg before dereferencing (PR #181752)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 17 08:21:32 PST 2026
================
@@ -5233,23 +5233,19 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-emit-llvm-uselists");
if (IsUsingLTO) {
+ Arg *OffloadLTO = Args.getLastArg(options::OPT_foffload_lto,
----------------
jhuber6 wrote:
Is this just for error handling? Do we have a test for this? Could just use `getLastArgValue`? That takes a default I believe so it would be sound if this was not passed.
https://github.com/llvm/llvm-project/pull/181752
More information about the cfe-commits
mailing list