[PATCH] D78799: [llvm-objcopy][MachO] Fix segment's vmsize

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 24 11:54:49 PDT 2020


smeenai added inline comments.


================
Comment at: llvm/tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp:169
       }
+      VMSize = std::max(VMSize, SectOffset + Sec->Size);
     }
----------------
What purpose is the `std::max` serving here, given that `VMSize` is set to 0 before the loop and isn't modified inside the loop, as far as I can see?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78799





More information about the llvm-commits mailing list