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

Jan Voung via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 16 06:37:40 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:

each loop iter up to `RangeSize` will bump `i` twice, so should it be * 2 ?

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


More information about the llvm-commits mailing list