[llvm-branch-commits] [llvm] [DirectX] Error handling improve in root signature metadata Parser (PR #149232)
Finn Plummer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jul 17 11:32:23 PDT 2025
================
@@ -111,14 +110,25 @@ analyzeModule(Module &M) {
reportError(Ctx, "Root Element is not a metadata node.");
continue;
}
- mcdxbc::RootSignatureDesc RSD;
- if (std::optional<uint32_t> Version = extractMdIntValue(RSDefNode, 2))
- RSD.Version = *Version;
+ uint32_t Version = 1;
+ if (std::optional<uint32_t> V = extractMdIntValue(RSDefNode, 2))
+ Version = *V;
----------------
inbelic wrote:
nit:
```suggestion
std::optional<uint32_t> V = extractMdIntValue(RSDefNode, 2);
if (!V.has_value()) { reportError(...); continue; }
```
https://github.com/llvm/llvm-project/pull/149232
More information about the llvm-branch-commits
mailing list