[clang] [llvm] [HLSL][RootSignature] Implement Parsing of Descriptor Tables (PR #122982)

Finn Plummer via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 14 13:59:35 PST 2025


================
@@ -162,5 +219,371 @@ std::optional<RootSignatureToken> RootSignatureLexer::PeekNextToken() {
   return Result;
 }
 
+// Parser Definitions
+
+RootSignatureParser::RootSignatureParser(SmallVector<RootElement> &Elements,
+                                         RootSignatureLexer &Lexer,
+                                         DiagnosticsEngine &Diags)
+    : Elements(Elements), Lexer(Lexer), Diags(Diags) {}
+
+bool RootSignatureParser::Parse() {
+  // Handle edge-case of empty RootSignature()
----------------
inbelic wrote:

My understanding is that from the perspective of parsing, an empty root signature would be valid. Instead an error is raised later when validating the structure. Presumably because not all the resources have a binding or so

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


More information about the cfe-commits mailing list