[PATCH] D141705: [HLSL] [Dirver] add dxv as a Driver Action Job
Xiang Li via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 27 15:03:35 PST 2023
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
More information about the cfe-commits
mailing list