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

Chris B via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jan 23 14:17:29 PST 2025


================
@@ -89,6 +91,72 @@ class RootSignatureLexer {
   }
 };
 
+class RootSignatureParser {
+public:
+  RootSignatureParser(SmallVector<RootElement> &Elements,
+                      const SmallVector<RootSignatureToken> &Tokens);
+
+  // Iterates over the provided tokens and constructs the in-memory
+  // representations of the RootElements.
+  //
+  // The return value denotes if there was a failure and the method will
+  // return on the first encountered failure, or, return false if it
+  // can sucessfully reach the end of the tokens.
+  bool Parse();
+
+private:
+  bool ReportError(); // TODO: Implement this to report error through Diags
----------------
llvm-beanz wrote:

I don't think this should be separate. It's going to be really hard to ensure that any follow-up that adds error reporting properly covers all the cases.

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


More information about the llvm-branch-commits mailing list