[PATCH] D39713: [llvm-objcopy] Change -O binary to respect section removal and behave like GNU objcopy

Jake Ehrlich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 12:28:07 PST 2017


jakehehrlich added inline comments.


================
Comment at: tools/llvm-objcopy/Object.cpp:903
+  TotalSize = 0;
+  for (const auto Section : AllocatedSections) {
+    if (Section->Type != SHT_NOBITS)
----------------
jhenderson wrote:
> const auto &
AllocatedSections is a vector of pointers so we shouldn't need to add that. Is there a reason in to add the reference that I'm not aware of? It's not as if it harms anything by being there, I'm just curious. I went ahead and added it in case there's some reason it should be done so that this doesn't block an LGTM.


Repository:
  rL LLVM

https://reviews.llvm.org/D39713





More information about the llvm-commits mailing list