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

Finn Plummer via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 3 09:36:26 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:

This is probably better moved to `ParseHLSLRootSignature.h` since it is specific to there

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


More information about the llvm-commits mailing list