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

Haopeng Liu via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 07:58:37 PDT 2024


================
@@ -2332,6 +2335,23 @@ 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");
+
+          SmallVector<ConstantRange, 2> Val;
+          int RangeSize = Record[++i];
+          assert(i + 2 * RangeSize < e);
----------------
haopliu wrote:

Ah, changed to an if with error return!

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


More information about the llvm-commits mailing list