In this diff we change the storage of a section to unique_ptr to avoid pointer invalidation in case of adding/removing new sections.
This refactoring is factored out from D71647.
Test plan: make check-all
Paths
| Differential D74946
[llvm-objcopy][MachO] Change the storage of sections. ClosedPublic Authored by alexander-shaposhnikov on Feb 20 2020, 9:11 PM.
Details Summary In this diff we change the storage of a section to unique_ptr to avoid pointer invalidation in case of adding/removing new sections. Test plan: make check-all
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Feb 20 2020, 9:17 PM Closed by commit rGdc046c70de96: [llvm-objcopy][MachO] Change the storage of sections (authored by alexander-shaposhnikov). · Explain WhyFeb 21 2020, 1:34 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 245981 llvm/tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp
llvm/tools/llvm-objcopy/MachO/MachOObjcopy.cpp
llvm/tools/llvm-objcopy/MachO/MachOReader.cpp
llvm/tools/llvm-objcopy/MachO/MachOWriter.cpp
llvm/tools/llvm-objcopy/MachO/Object.h
llvm/tools/llvm-objcopy/MachO/Object.cpp
|