[clang] [HLSL] Add TableGen-generated header files to the HLSL distribution (PR #190222)

Deric C. via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 2 10:46:57 PDT 2026


https://github.com/Icohedron created https://github.com/llvm/llvm-project/pull/190222

This PR adds the TableGen-generated headers from https://github.com/llvm/llvm-project/pull/187610 to the HLSL distribution.

Currently the HLSL distribution is incomplete due to missing these generated headers, preventing successful compilation:
```
Command Output (stderr):
--
In file included from <built-in>:1:

In file included from D:\a\_work\1\ClangHLSL\Binaries\lib\clang\23\include\hlsl.h:24:

D:\a\_work\1\ClangHLSL\Binaries\lib\clang\23\include\hlsl/hlsl_alias_intrinsics.h:42:10: fatal error: 'hlsl_alias_intrinsics_gen.inc' file not found

   42 | #include "hlsl_alias_intrinsics_gen.inc"

      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1 error generated.
```
This PR fixes the error by including `hlsl_alias_intrinsics_gen.inc` and `hlsl_inline_intrinsics_gen.inc` in the HLSL distribution.

>From 5cc1fdea3cf4a58e9b7b063601cd85b4c7f8c2ff Mon Sep 17 00:00:00 2001
From: Deric Cheung <cheung.deric at gmail.com>
Date: Thu, 2 Apr 2026 10:39:40 -0700
Subject: [PATCH] Add generated header files to the HLSL distribution

---
 clang/lib/Headers/CMakeLists.txt | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/clang/lib/Headers/CMakeLists.txt b/clang/lib/Headers/CMakeLists.txt
index 1bd5bbfc0cdc0..b44a3c55b8cc7 100644
--- a/clang/lib/Headers/CMakeLists.txt
+++ b/clang/lib/Headers/CMakeLists.txt
@@ -808,6 +808,12 @@ install(
   ${EXCLUDE_HLSL}
   COMPONENT hlsl-resource-headers)
 
+install(
+  FILES ${hlsl_generated_files}
+  DESTINATION ${header_install_dir}/hlsl
+  ${EXCLUDE_HLSL}
+  COMPONENT hlsl-resource-headers)
+
 install(
   FILES ${spirv_files}
   DESTINATION ${header_install_dir}



More information about the cfe-commits mailing list