Details
Diff Detail
Event Timeline
| ELF/EhFrame.cpp | ||
|---|---|---|
| 42 | Do you need ::? Ah, so you are defining a new function with the same name. Please avoid overloading because the two functions are semantically different. | |
| 143 | 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. | |
| ELF/EhFrame.h | ||
| 13 | Instead of adding a new #include, declare the class you need. | |
| ELF/EhFrame.cpp | ||
|---|---|---|
| 143 | This function is called from outside (OutputSections.cpp), so the caller should construct EhReader then. Is this good? | |
| ELF/EhFrame.cpp | ||
|---|---|---|
| 143 | 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();
} | |
| ELF/EhFrame.cpp | ||
|---|---|---|
| 143 | Oh, I see. Now clear. | |
Instead of adding a new #include, declare the class you need.