================
@@ -1268,11 +1268,34 @@ bool SemaHLSL::handleRootSignatureElements(
         // value
         ReportError(Loc, 1, 0xfffffffe);
       }
+      switch (Clause->Type) {
----------------
bogner wrote:

This would be simpler with a `toDescriptorRangeType()` helper (whether as a 
static function or even just a lambda). Also, the flags argument to 
`verifyDescriptorRangeFlag` looks like it's just immediately cast back to a 
dxbc::DescriptorRangeFlags - we should just update the signature to take the 
enum in the first place.
```c++
      if (!llvm::hlsl::rootsig::verifyDescriptorRangeFlag(
              Version, toDescriptorRangeType(Clause->Type), Clause->Flags))
        ReportFlagError(Loc);
```

https://github.com/llvm/llvm-project/pull/154629
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to