aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/ValueEnumerator.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/ValueEnumerator.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/ValueEnumerator.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/ValueEnumerator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
index 0c6e746..9465a3b 100644
--- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
+++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
@@ -1039,7 +1039,7 @@ void ValueEnumerator::EnumerateAttributes(AttributeList PAL) {
}
// Do lookups for all attribute groups.
- for (unsigned i = PAL.index_begin(), e = PAL.index_end(); i != e; ++i) {
+ for (unsigned i : PAL.indexes()) {
AttributeSet AS = PAL.getAttributes(i);
if (!AS.hasAttributes())
continue;