[llvm] [HLSL] Adding support for root descriptors in root signature metadata representation (PR #139781)

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 3 10:57:16 PDT 2025


================
@@ -55,6 +55,14 @@ static std::optional<uint32_t> extractMdIntValue(MDNode *Node,
   return std::nullopt;
 }
 
+static std::optional<StringRef> extractMdStringValue(MDNode *Node,
+                                                     unsigned int OpId) {
+  MDString *NodeText = cast<MDString>(Node->getOperand(OpId));
+  if (NodeText == nullptr)
+    return std::nullopt;
----------------
bogner wrote:

Looks like you fixed the crash here, but could you please add a test as well?

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


More information about the llvm-commits mailing list