aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2021-09-30 13:57:55 -0700
committerArthur Eubanks <aeubanks@google.com>2021-10-01 10:17:41 -0700
commita7b4ce9cfd110db56d89fa8d76b39023d038de11 (patch)
treed98b67823f4b047105d76f76694aab9f3ad485da /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent31c92d515dd21c49a2b3bcedd991fffb3b6dfd55 (diff)
downloadllvm-a7b4ce9cfd110db56d89fa8d76b39023d038de11.zip
llvm-a7b4ce9cfd110db56d89fa8d76b39023d038de11.tar.gz
llvm-a7b4ce9cfd110db56d89fa8d76b39023d038de11.tar.bz2
[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
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index a915d47..23d6132 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -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}));