commit | 2b1628c89c225f2131a06976576964d345e91f02 | [log] [tgz] |
---|---|---|
author | Steven Perron <stevenperron@google.com> | Wed Jun 18 06:39:52 2025 -0400 |
committer | Copybara-Service <copybara-worker@google.com> | Wed Jun 18 03:41:21 2025 -0700 |
tree | 64473c2f734f9e4100fbc93f533fe167883e649b | |
parent | 4e4b7a60fe5e1fc70c3634cec124fe2a8d44e7c3 [diff] |
[HLSL][SPIRV] Add vk::constant_id attribute. (#143544) The vk::constant_id attribute is used to indicate that a global const variable represents a specialization constant in SPIR-V. This PR adds this attribute to clang. The documentation for the attribute is [here](https://github.com/microsoft/DirectXShaderCompiler/blob/main/docs/SPIR-V.rst#specialization-constants). The strategy is to to modify the initializer to get the value of a specialize constant for a builtin defined in the SPIR-V backend. Implements https://github.com/llvm/wg-hlsl/pull/287 Fixes https://github.com/llvm/llvm-project/issues/142448 --------- Co-authored-by: Nathan Gauër <github@keenuts.net> GitOrigin-RevId: acde20b5605f3a3a8da2217e4526fc045e6603ed
Welcome to Clang.
This is a compiler front-end for the C family of languages (C, C++ and Objective-C) which is built as part of the LLVM compiler infrastructure project.
Unlike many other compiler frontends, Clang is useful for a number of things beyond just compiling code: we intend for Clang to be host to a number of different source-level tools. One example of this is the Clang Static Analyzer.
If you're interested in more (including how to build Clang) it is best to read the relevant websites. Here are some pointers:
Information on Clang: http://clang.llvm.org/
Building and using Clang: http://clang.llvm.org/get_started.html
Clang Static Analyzer: http://clang-analyzer.llvm.org/
Information on the LLVM project: http://llvm.org/
If you have questions or comments about Clang, a great place to discuss them is on the Clang forums:
If you find a bug in Clang, please file it in the LLVM bug tracker: