[llvm-branch-commits] [llvm] [HLSL][RootSignature] Implement `ResourceRange` as an `IntervalMap` (PR #140957)

Justin Bogner via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu May 29 09:28:01 PDT 2025


================
@@ -198,6 +199,61 @@ class MetadataBuilder {
   SmallVector<Metadata *> GeneratedMetadata;
 };
 
+// RangeInfo holds the information to correctly construct a ResourceRange
+// and retains this information to be used for displaying a better diagnostic
+struct RangeInfo {
+  const static uint32_t Unbounded = static_cast<uint32_t>(-1);
----------------
bogner wrote:

I think `~0U` (if you want to be concise) or `std::numeric_limits<uint32_t>::max()` are very slightly clearer here.

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


More information about the llvm-branch-commits mailing list