[PATCH] D65367: [Object] Create MutableELFObject Class for Doing Mutations on ELFObjectFiles [Part 2]

Alex Brachet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 18:19:53 PDT 2019


abrachet marked 2 inline comments as done.
abrachet added inline comments.


================
Comment at: llvm/include/llvm/Object/MutableELFObject.h:331
+uint32_t MutableELFObject<ELFT>::findSectionOfType(uint64_t ShType) const {
+  for (uint32_t I = 0; I < Sections.originalSize(); ++I)
+    if (Sections.getOriginal(I).sh_type == ShType)
----------------
MaskRay wrote:
> `uint32_t I = 0, E = Sections.originalSize(); I != E; ++I)`
> 
> https://llvm.org/docs/CodingStandards.html#don-t-evaluate-end-every-time-through-a-loop
> 
> Not a strong opinion though.
Good catch! Thanks


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

https://reviews.llvm.org/D65367





More information about the llvm-commits mailing list