[PATCH] D26914: [ELF] Print file name and section offset in .eh_frame parser
Eugene Leviant via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 21 08:17:28 PST 2016
evgeny777 added inline comments.
================
Comment at: ELF/EhFrame.cpp:143
-template <class ELFT> uint8_t getFdeEncoding(ArrayRef<uint8_t> D) {
+template <class ELFT> uint8_t elf::getFdeEncoding(EhSectionPiece *P) {
+ ArrayRef<uint8_t> D = P->data();
----------------
ruiu wrote:
> evgeny777 wrote:
> > ruiu wrote:
> > > I'd add this function to ReadHelper to eliminate `H.` from this function. And then probably you want to rename ReadHelper EhReader or something like that.
> > >
> > > You can also eliminate `ArrayRef<uint_8> &` from read* functions if you make the ArrayRef a member of the class.
> > This function is called from outside (OutputSections.cpp), so the caller should construct EhReader then. Is this good?
> You can keep the existing function interface, right?
>
> template <class ELFT> uint8_t elf::getFdeEncoding(EhSectionPiece *Piece) {
> auto *Sec = cast<InputSectionBase<ELFT> *>(Piece->ID);
> return EhReader(Sec, Piece->data()).getFdeEncoding();
> }
>
Oh, I see. Now clear.
Repository:
rL LLVM
https://reviews.llvm.org/D26914
More information about the llvm-commits
mailing list