diff options
author | Xiang Li <python3kgae@outlook.com> | 2022-05-05 15:31:22 -0700 |
---|---|---|
committer | Xiang Li <python3kgae@outlook.com> | 2022-05-31 13:54:17 -0700 |
commit | 13e1a653278ba4a9805f0247c5bc92dad720aab3 (patch) | |
tree | 4cfee4192938d701a73b1abe35873bea7c9dfa37 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 8579db96e8c319acb02064542632f42dd63039ba (diff) | |
download | llvm-13e1a653278ba4a9805f0247c5bc92dad720aab3.zip llvm-13e1a653278ba4a9805f0247c5bc92dad720aab3.tar.gz llvm-13e1a653278ba4a9805f0247c5bc92dad720aab3.tar.bz2 |
[HLSL] Enable vector types for hlsl.
Vector types in hlsl is using clang ext_vector_type.
Declaration of vector types is in builtin header hlsl.h.
hlsl.h will be included by default for hlsl shader.
Reviewed By: Anastasia
Differential Revision: https://reviews.llvm.org/D125052
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 32b084d..a51d462 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -4202,6 +4202,10 @@ static void GeneratePreprocessorArgs(PreprocessorOptions &Opts, ((LangOpts.DeclareOpenCLBuiltins && I == "opencl-c-base.h") || I == "opencl-c.h")) continue; + // Don't generate HLSL includes. They are implied by other flags that are + // generated elsewhere. + if (LangOpts.HLSL && I == "hlsl.h") + continue; GenerateArg(Args, OPT_include, I, SA); } |