[clang] [llvm] [NFC][HLSL][RootSignature] Split up `HLSLRootSignatureUtils` (PR #146124)
Finn Plummer via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 3 21:11:32 PDT 2025
================
@@ -0,0 +1,56 @@
+//===- RootSignatureMetadata.h - HLSL Root Signature helpers --------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file This file contains a library for working with HLSL Root Signatures and
+/// their metadata representation.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_FRONTEND_HLSL_ROOTSIGNATUREMETADATA_H
+#define LLVM_FRONTEND_HLSL_ROOTSIGNATUREMETADATA_H
+
+#include "llvm/Frontend/HLSL/HLSLRootSignature.h"
+
+namespace llvm {
+class LLVMContext;
+class MDNode;
+class Metadata;
+
+namespace hlsl {
+namespace rootsig {
+
+class MetadataBuilder {
+public:
+ MetadataBuilder(llvm::LLVMContext &Ctx, ArrayRef<RootElement> Elements)
+ : Ctx(Ctx), Elements(Elements) {}
+
+ /// Iterates through the elements and dispatches onto the correct Build method
----------------
inbelic wrote:
```suggestion
/// Iterates through elements and dispatches onto the correct Build* method
```
https://github.com/llvm/llvm-project/pull/146124
More information about the llvm-commits
mailing list