[HLSL] Pass flags to cc1 based on language
authorChris Bieneman <chris.bieneman@me.com>
Tue, 20 Sep 2022 15:41:43 +0000 (10:41 -0500)
committerChris Bieneman <chris.bieneman@me.com>
Tue, 20 Sep 2022 15:56:17 +0000 (10:56 -0500)
commit0c89b343371fca437a86093a01dc5eb6ed1a4a9b
treeaab60b4c25a628408440a356b96bd75cec6364f9
parent837caa99a273c76541a376768e1ba0f7a094fde0
[HLSL] Pass flags to cc1 based on language

Having the flags only pass through if you're using the dxc-driver means
that the clang driver doesn't work for HLSL, which is undesirable. This
change switches to instead passing flags based on the language mode
similar to how OpenCL does it. This allows the clang driver to be used
for HLSL source files as well.

Reviewed By: python3kgae

Differential Revision: https://reviews.llvm.org/D133958
clang/include/clang/Driver/Types.h
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/Types.cpp
clang/test/Driver/hlsl_no_stdinc.hlsl