[llvm] Allow empty range attribute and add assert for full range (PR #100601)

Andreas Jonson via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 7 10:02:01 PDT 2024


================
@@ -286,6 +286,12 @@ Attribute Attribute::getWithNoFPClass(LLVMContext &Context,
   return get(Context, NoFPClass, ClassMask);
 }
 
+Attribute Attribute::getWithRange(LLVMContext &Context,
+                                  const ConstantRange &CR) {
+  assert(!CR.isFullSet() && "Range must not be full!");
----------------
andjo403 wrote:

yes that seems resonable.

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


More information about the llvm-commits mailing list