[PATCH] D71331: [llvm-objcopy][MachO][NFC] Allow section to own its contents

Seiya Nuta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 12 18:06:48 PST 2019


seiya marked an inline comment as done.
seiya added inline comments.


================
Comment at: llvm/tools/llvm-objcopy/MachO/Object.h:43
+  ArrayRef<uint8_t> ContentsRef;
+
+public:
----------------
jhenderson wrote:
> alexshap wrote:
> > frankly speaking i am somehow not sure this is the best possible solution.
> > Having these two fields + sort of duplication of logic / code size increase ..
> > 
> > Maybe we can consider some alternatives ?
> > 
> > The first thing which comes on my mind - 
> > use StringSaver NewSectionsContents
> > (for example, it can be a field of Object)
> > and keep using ArrayRef / StringRef inside Section.
> > But there are other options as well.
> > 
> > What do you think ? (maybe I'm missing something)
> > 
> A StringSaver sounds like an interesting idea. I think it's worth exploring.
Sounds good to me too. I'll try it out.


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

https://reviews.llvm.org/D71331





More information about the llvm-commits mailing list