diff options
author | Xiang Li <python3kgae@outlook.com> | 2022-05-05 15:31:22 -0700 |
---|---|---|
committer | Xiang Li <python3kgae@outlook.com> | 2022-05-30 09:05:29 -0700 |
commit | e576280380d3f5221cfcc14e9fabeacc8506a43c (patch) | |
tree | 65bb7c9e6bdcc2e333e8c233f5db66366a5faf6f /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | f8239eec8decd3459d4f638b98c4f582add31263 (diff) | |
download | llvm-e576280380d3f5221cfcc14e9fabeacc8506a43c.zip llvm-e576280380d3f5221cfcc14e9fabeacc8506a43c.tar.gz llvm-e576280380d3f5221cfcc14e9fabeacc8506a43c.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); } |