[PATCH] D105089: [llvm-objcopy][MachO] Code cleanup
Alexander Shaposhnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 29 02:27:31 PDT 2021
alexander-shaposhnikov added inline comments.
================
Comment at: llvm/tools/llvm-objcopy/MachO/MachOReader.cpp:79
- Sections.push_back(
- std::make_unique<Section>(constructSection(*Curr, NextSectionIndex)));
- }
----------------
jhenderson wrote:
> alexander-shaposhnikov wrote:
> > @jhenderson this pointer dereference appears to be problematic.
> > Perhaps, we should drop reinterpret_cast on line 68 completely.
> Thanks. Given the change you've made, I don't think we really need to drop it. You could however move the `Curr` initialization into the for loop initialization list, if I'm not mistaken. Following your change then, there is no motivation to use `Curr` directly, I think, and moving it into the loop helps reinforce it further.
yeah, I'll update this diff
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105089/new/
https://reviews.llvm.org/D105089
More information about the llvm-commits
mailing list