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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 22:38:12 PDT 2019


MaskRay accepted this revision.
MaskRay 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)
----------------
`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.


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

https://reviews.llvm.org/D65367





More information about the llvm-commits mailing list