[llvm] Add the 'initializes' attribute langref and support (PR #84803)
Haopeng Liu via llvm-commits
llvm-commits at lists.llvm.org
Thu May 9 10:45:00 PDT 2024
================
@@ -943,11 +947,20 @@ void ModuleBitcodeWriter::writeAttributeGroupTable() {
Record.push_back(getAttrKindEncoding(Attr.getKindAsEnum()));
if (Ty)
Record.push_back(VE.getTypeID(Attr.getValueAsType()));
- } else {
- assert(Attr.isConstantRangeAttribute());
+ } else if (Attr.isConstantRangeAttribute()) {
Record.push_back(7);
Record.push_back(getAttrKindEncoding(Attr.getKindAsEnum()));
- emitConstantRange(Record, Attr.getValueAsConstantRange());
+ emitConstantRange(Record, Attr.getValueAsConstantRange(),
+ /*EmitBitWidth=*/true);
+ } else {
+ assert(Attr.isConstantRangeListAttribute());
+ Record.push_back(8);
+ Record.push_back(getAttrKindEncoding(Attr.getKindAsEnum()));
+ ArrayRef<ConstantRange> Val = Attr.getValueAsConstantRangeList();
+ Record.push_back(Val.size());
----------------
haopliu wrote:
Thanks for the reminder. Done!
https://github.com/llvm/llvm-project/pull/84803
More information about the llvm-commits
mailing list