[NFC][AttributeList] Replace index_begin/end with an iterator
We expose the fact that we rely on unsigned wrapping to iterate through all indexes. This can be confusing. Rather, keeping it as an implementation detail through an iterator is less confusing and is less code. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D110885
This commit is contained in:
@@ -835,7 +835,7 @@ void ModuleBitcodeWriter::writeAttributeTable() {
|
||||
SmallVector<uint64_t, 64> Record;
|
||||
for (unsigned i = 0, e = Attrs.size(); i != e; ++i) {
|
||||
AttributeList AL = Attrs[i];
|
||||
for (unsigned i = AL.index_begin(), e = AL.index_end(); i != e; ++i) {
|
||||
for (unsigned i : AL.indexes()) {
|
||||
AttributeSet AS = AL.getAttributes(i);
|
||||
if (AS.hasAttributes())
|
||||
Record.push_back(VE.getAttributeGroupID({i, AS}));
|
||||
|
||||
Reference in New Issue
Block a user