[PATCH] D71647: [llvm-objcopy][MachO] Handle relocation entries where r_extern is 0
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 19 01:43:40 PST 2019
jhenderson added inline comments.
================
Comment at: llvm/tools/llvm-objcopy/MachO/Object.h:93
// corresponding content inside the binary.
- std::vector<Section> Sections;
+ std::vector<std::unique_ptr<Section>> Sections;
----------------
seiya wrote:
> jhenderson wrote:
> > Is this really necessary? As far as I can tell, the only place it's actually important is where you create a vector of section pointers, but you can do that without needing these to be unique_ptrs. I've commented above.
> I think this should be unique pointers. Pointers to vector elements could be invalidated by --add-section/--remove-section operations.
>
Okay, that's a good point, but why wasn't it an issue already?
Assuming that it's actually important, I think moving the unique_ptr changes into a separate patch would make it more obvious what's actually important for this functional change.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71647/new/
https://reviews.llvm.org/D71647
More information about the llvm-commits
mailing list