[Lldb-commits] [PATCH] D110885: [NFC][AttributeList] Replace index_begin/end with an iterator

Shafik Yaghmour via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 30 15:09:28 PDT 2021


shafik added inline comments.


================
Comment at: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp:838
     AttributeList AL = Attrs[i];
-    for (unsigned i = AL.index_begin(), e = AL.index_end(); i != e; ++i) {
+    for (auto i : AL.indexes()) {
       AttributeSet AS = AL.getAttributes(i);
----------------
You changed this one to `auto` but left the others `unsigned`. I think leaving it as `unsigned` makes more sense since it is not obvious what we expect the type to be here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110885/new/

https://reviews.llvm.org/D110885



More information about the lldb-commits mailing list