[llvm] Add the 'initializes' attribute langref and support (PR #84803)

Jan Voung via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 09:56:15 PDT 2024


================
@@ -2313,6 +2316,21 @@ Error BitcodeReader::parseAttributeGroupBlock() {
           i--;
 
           B.addConstantRangeAttr(Kind, MaybeCR.get());
+        } else if (Record[i] == 8) {
+          Attribute::AttrKind Kind;
+          if (Error Err = parseAttrKind(Record[++i], &Kind))
+            return Err;
+          if (!Attribute::isConstantRangeListAttrKind(Kind))
+            return error("Not a constant range list attribute");
+
+          ConstantRangeList CRL(64, false);
+          int RangeSize = Record[++i];
----------------
jvoung wrote:

Maybe assert i + (RangeSize * 2) < e
(please double check if I got that right)

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


More information about the llvm-commits mailing list