[clang][DependencyScanning] Return failure upon CompilerInstanceWithContext failure to create target (#211607)
This was first pointed out by a static analysis scan: Success/failure
results from `CompilerInstance::createTarget` in
`CompilerInstanceWithContext::initialize` is currently being discarded.
AFAICT, `initialize` should have failed if
`CompilerInstance::createTarget` failed, as I noticed that calls in
`CompilerInstanceWithContext::computeDependencies` (which is ran right
after `initialize`) contains function calls (i.e. `CI.loadModule`) that
make references to `CompilerInstance::getTarget`: `getTarget` then tries
to obtain a reference to the very `TargetInfo` instance that the earlier
`CompilerInstance::createTarget` call failed to create.
AFAIK `createTarget` doesn't actually seem to fail currently, but I
haven't been able to find a good reason as for why success/failure from
`CompilerInstance::createTarget` should be ignored even if it failed.
But please let me know if I am not seeing something here!