This skips searching for target related flags in the existing args if
we don't have a valid target to insert.
Depends on D85076
Differential D85077
[clang][Tooling] Optimize addTargetAndMode in case of invalid modes Authored by kadircet on Aug 1 2020, 10:04 AM.
Details This skips searching for target related flags in the existing args if Depends on D85076
Diff Detail
Event Timeline
Comment Actions
| ||||||||||||||||||
While this is an optimization, I find the code is a bit harder to follow, with this patch AlreadyHasTarget has two semantic meanings: 1) for has target and 2) for target mode is valid.
I guess we could do it like
if (TargetMode.TargetIsValid) { // set the TargetOPT, TargetOPTLegacy variables // search the command line of the target opt. // insert to CommandLine. }maybe we could do the same thing for the DriverMode
if (TargetMode.DriverMode) { ... }