[PATCH] D64281: [Object] Create MutableELFObject Class for Doing Mutations on ELFObjectFiles [Part 1]

Alex Brachet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 24 21:38:42 PDT 2019


abrachet marked 3 inline comments as done.
abrachet added inline comments.


================
Comment at: llvm/include/llvm/Object/MutableELFObject.h:21
+
+template <typename T> static inline DataRefImpl toDataRef(T Ptr) {
+  DataRefImpl Ref;
----------------
jhenderson wrote:
> In nearly every case I can see, toDataRef is called with a uintptr_t, so do you need the template? What case doesn't work in that case?
The `MutableRange<MutableELFSection<ELFT>>::getNew` method returns a pointer to a `MutableELFSection<ELFT>` which is used for getName and getContents which need a pointer to the new section.


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

https://reviews.llvm.org/D64281





More information about the llvm-commits mailing list