[PATCH] D137800: [llvm-driver] Reinvoke clang as described by llvm driver extra args
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 9 15:47:45 PST 2023
phosek added a comment.
I see the following pattern being duplicated:
if (ToolContext.IsDriver)
Path = ToolContext.ReinvokeArgs[0];
...
if (ToolContext.ReinvokeArgs.size() > 1)
TheDriver.setLLVMDriverPrependArg(ToolContext.ReinvokeArgs.back());
Could we split `ReinvokeArgs` into `Path` and `PrependArgs` (which would be `nullptr` if there are none)?
It'd be great if we could avoid `IsDriver` altogether to minimize the difference in behavior between the driver and non-driver case.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137800/new/
https://reviews.llvm.org/D137800
More information about the llvm-commits
mailing list