[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
Thu Aug 8 06:53:24 PDT 2019


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


================
Comment at: llvm/include/llvm/Object/MutableELFObject.h:121
+
+  const Elf_Shdr *getSection(DataRefImpl Sec) const override {
+    return &Sections[Sec.p];
----------------
jhenderson wrote:
> abrachet wrote:
> > jhenderson wrote:
> > > Does this need to exist? If so, it needs unit-testing.
> > Yes. It is used for every public method on `SectionRef` that gets tested in the unit test. Is this enough or should I test it directly as well?
> I have no idea which method this was referring to any more...
Oops I think I responded to this before adding the comments so I forgot to add a what the comment was originally referring to.

It was `getSection(DataRefImpl)`. Its the function that I made virtual from `ELFObjectFile`. All the tests that I have now like `FirstSec->getSize()` //test// this method


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

https://reviews.llvm.org/D64281





More information about the llvm-commits mailing list