[llvm] [DirectX] Add Range Overlap validation (PR #152229)
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 6 16:55:50 PDT 2025
================
@@ -24,6 +25,35 @@ using namespace llvm;
using namespace llvm::dxil;
namespace {
+static ResourceClass RangeToResourceClass(uint32_t RangeType) {
+ using namespace dxbc;
+ switch (static_cast<DescriptorRangeType>(RangeType)) {
----------------
bogner wrote:
It's weird for this function to take a `uint32_t`, and this function isn't following llvm naming conventions. We can solve both of these by creating a strongly typed conversion function that can be overloaded, like `static ResourceClass toResourceClass(dxbc::DescriptorRangeType)`.
https://github.com/llvm/llvm-project/pull/152229
More information about the llvm-commits
mailing list