[PATCH] D29658: [OpenMP] Customize CUDA-based tool chain selection

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 5 23:25:41 PDT 2017


Hahnfeld added inline comments.


================
Comment at: lib/Driver/Driver.cpp:564
+              auto &CudaTC =
+                  ToolChains[TT.str() + "/" + HostTC->getTriple().normalize()];
+              if (!CudaTC)
----------------
gtbercea wrote:
> Hahnfeld wrote:
> > The code above uses `HostTriple.str()`, maybe better align to this?
> HostTriple is equivalent with HostTC->getTriple(). HostTC->getTriple() is only used once so no need for a local variable unless you want me to refactor the CUDA code above and take out HostTriple from within the if statement and then re0use HostTriple that way. I'd rather not make changes to the CUDA toolchain above.
Sorry, I meant the mismatch between `.str()` above and `.normalize()` here


https://reviews.llvm.org/D29658





More information about the cfe-commits mailing list