[PATCH] D15712: [ELF] - implemented --eh-frame-hdr command line option.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 12 09:30:37 PST 2016


grimar added inline comments.

================
Comment at: ELF/OutputSections.cpp:1073
@@ +1072,3 @@
+template <class ELFT>
+bool EHOutputSection<ELFT>::readCieInfo(Cie<ELFT> &Cie, ArrayRef<uint8_t> D) {
+  uint8_t Version;
----------------
ruiu wrote:
> This function reads only encoding, right? Then maybe we should change this function signature to
> 
>   ErrorOr<uint8_t> getFdeEncoding(ArrayRef<uint8_t> D)
> 
> ?
> 
> Also I'm wondering if corrupted CIEs/FDEs are so prevalent that we have to take care of them. For now, I'd like to simply use error() whenever we find something wrong. Then we can change the signature to
> 
>   uint8_t getFdeEncoding(ArrayRef<uint8_t> D)
> 
> which is pretty simple to understand.
What about getFdeEnc() then ? (to calm down the clang format).
I also changed readByte and skipLeb128 to uint8_t readByte() and void skipLeb128().
And introduced cieParseError() more method to report CIE parse errors in a single place.


http://reviews.llvm.org/D15712





More information about the llvm-commits mailing list