[clang] [llvm] [HLSL][RootSignature] Metadata generation of RootFlags, RootConstants, RootDescriptors (PR #142010)

via cfe-commits cfe-commits at lists.llvm.org
Thu May 29 11:43:00 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions h,cpp -- llvm/include/llvm/Frontend/HLSL/HLSLRootSignature.h llvm/lib/Frontend/HLSL/HLSLRootSignature.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Frontend/HLSL/HLSLRootSignature.cpp b/llvm/lib/Frontend/HLSL/HLSLRootSignature.cpp
index cd606e61f..2925acc8b 100644
--- a/llvm/lib/Frontend/HLSL/HLSLRootSignature.cpp
+++ b/llvm/lib/Frontend/HLSL/HLSLRootSignature.cpp
@@ -211,8 +211,8 @@ MDNode *MetadataBuilder::BuildRootConstants(const RootConstants &Constants) {
                    Builder.getInt32(llvm::to_underlying(Constants.Visibility))),
                ConstantAsMetadata::get(Builder.getInt32(Constants.Reg.Number)),
                ConstantAsMetadata::get(Builder.getInt32(Constants.Space)),
-               ConstantAsMetadata::get(Builder.getInt32(
-                   Constants.Num32BitConstants)),
+               ConstantAsMetadata::get(
+                   Builder.getInt32(Constants.Num32BitConstants)),
            });
 }
 
@@ -224,8 +224,8 @@ MDNode *MetadataBuilder::BuildRootDescriptor(const RootDescriptor &Descriptor) {
   return MDNode::get(
       Ctx, {
                MDString::get(Ctx, OS.str()),
-               ConstantAsMetadata::get(
-                   Builder.getInt32(llvm::to_underlying(Descriptor.Visibility))),
+               ConstantAsMetadata::get(Builder.getInt32(
+                   llvm::to_underlying(Descriptor.Visibility))),
                ConstantAsMetadata::get(Builder.getInt32(Descriptor.Reg.Number)),
                ConstantAsMetadata::get(Builder.getInt32(Descriptor.Space)),
                ConstantAsMetadata::get(

``````````

</details>


https://github.com/llvm/llvm-project/pull/142010


More information about the cfe-commits mailing list