python3kgae added inline comments.

================
Comment at: clang/lib/Driver/Driver.cpp:4217-4218
+    // Only add action when needValidation.
+    const auto &TC = getToolChain(Args, C.getDefaultToolChain().getTriple());
+    const auto *HLSLTC = static_cast<const toolchains::HLSLToolChain *>(&TC);
+    if (HLSLTC->needValidation(Args, *this)) {
----------------
jhuber6 wrote:
> This can create a new `ToolChain`. We probably don't want that. Maybe someone 
> more familiar with this compilation mode can chime in. But my guess is that 
> when we created the `Compilation`.
> 
> This code will only fire if the above triple matches for the default 
> ToolChain. So we should be safe in just casting it directly.
Switched to getDefaultToolChain.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141705

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to