[PATCH] D132036: [llvm-objdump] Add -dyld_info to llvm-otool
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 26 10:23:59 PDT 2022
thakis added inline comments.
================
Comment at: llvm/lib/Object/MachOObjectFile.cpp:2116
+ size_t Idx = 0;
+ for (auto LoadCmd : load_commands()) {
+ switch (LoadCmd.C.cmd) {
----------------
thakis wrote:
> The name-based version of this has to loop, but couldn't this version just do:
>
> auto &LoadCmd = LoadCommands[SegmentIndex];
>
> instead of the loop? (Range check before that, of course.)
Please ignore, I just realized `SegmentIndex`, not `LoadCommandIndex`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132036/new/
https://reviews.llvm.org/D132036
More information about the llvm-commits
mailing list