[clang] [llvm] [HLSL][RootSignature] Add infastructure to parse parameters (PR #133800)

Finn Plummer via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 14 09:19:04 PDT 2025


================
@@ -32,11 +39,19 @@ struct DescriptorTable {
 using ClauseType = llvm::dxil::ResourceClass;
 struct DescriptorTableClause {
   ClauseType Type;
+  Register Register;
+  uint32_t Space = 0;
 };
 
 // Models RootElement : DescriptorTable | DescriptorTableClause
 using RootElement = std::variant<DescriptorTable, DescriptorTableClause>;
 
+// ParamType is used as an 'any' type that will reference to a parameter in
+// RootElement. Each variant of ParamType is expected to have a Parse method
+// defined that will be dispatched on when we are attempting to parse a
+// parameter
+using ParamType = std::variant<uint32_t *, Register *>;
----------------
inbelic wrote:

Can be removed completely now if we use the struct approach

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


More information about the llvm-commits mailing list