[PATCH] D127774: [Binary] Add iterator to the OffloadBinary string maps

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 14 13:45:30 PDT 2022


tra added inline comments.


================
Comment at: llvm/include/llvm/Object/OffloadBinary.h:62-63
+
+  using string_iterator = StringMap<StringRef>::const_iterator;
+  using string_iterator_range = iterator_range<string_iterator>;
+
----------------
Should these be `public`? 


================
Comment at: llvm/include/llvm/Object/OffloadBinary.h:65-66
+
+  string_iterator data_begin() const { return StringData.begin(); }
+  string_iterator data_end() const { return StringData.end(); }
+
----------------
Do we need these? They are not public and are used in just one place where we could just use `StringData.begin()/end()` directly.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127774



More information about the llvm-commits mailing list