[PATCH] D98128: [clang][clangd] Avoid inconsistent target creation

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 6 01:56:26 PDT 2021


kadircet accepted this revision.
kadircet added a comment.
This revision is now accepted and ready to land.

sorry for the delay here. thanks, this LGTM!

i've got a single concern in `CompilerInstance::createTarget` though. it will overwrite aux target for cuda, openmp and sycl (as it unconditionally sets auxtarget even if it exists).
it doesn't cause any problems today, because `CompilerInstance::setAuxTarget` is (AFAICT) only called within `createTarget`, but it might be nice to (on a separate patch) either:

- leave a comment explaining why we overwrite if there's a reason or,
- put it behind the condition of auxtarget being missing

so that future travellers do know what to do.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98128/new/

https://reviews.llvm.org/D98128



More information about the cfe-commits mailing list