[clang] [llvm] [DirectX] Removing dxbc DescriptorRange from mcbxdc (PR #154629)

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 10 11:30:00 PDT 2025


================
@@ -209,6 +202,13 @@ inline bool isValidParameterType(uint32_t V) {
   return false;
 }
 
+inline bool isValidRangeType(uint32_t V) {
+  static_assert(llvm::to_underlying(dxil::ResourceClass::Sampler) == 3,
+                "dxil::ResourceClass numeric values must match the Root "
+                "Signature values associated to each class.");
+  return V <= llvm::to_underlying(dxil::ResourceClass::Sampler);
----------------
bogner wrote:

Yeah, other than `static_assert` on each value individually there isn't much we can do here. I think the test coverage is sufficient here.

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


More information about the llvm-commits mailing list