[PATCH] D44560: [DWARF] Rework debug line parsing to use llvm::Error and callbacks

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 30 11:38:10 PDT 2018


dblaikie added inline comments.


================
Comment at: include/llvm/DebugInfo/DWARF/DWARFDebugLine.h:30
 
+class DebugLineLengthError : public ErrorInfo<DebugLineLengthError> {
+public:
----------------
I thought at some point the review reached concensus that a separate error type was not needed - how'd it come back around again?

I think I'd expect that API users wouldn't need to know the difference - they'd get told errors and get given as many line tables as could be parsed correctly, regardless of what kind of errors they were. (in the implementation, errors that result in inability to parse more things, would stop producing more things)

Also, the mention in the patch description that this would result in inability to parse a line table contribution at a known offset seems problematic - if you have a section with some junk, then a line table, and there's a debug_info section that refers to the line table by the correct offset, the presence of junk coming before that line table doesn't seem like it should break dumping, right? But I suppose that's just "nice to have" maybe & not worth contorting the code too much to support.


Repository:
  rL LLVM

https://reviews.llvm.org/D44560





More information about the llvm-commits mailing list