[PATCH] D43470: [DWARF] Prevent crash when .debug_line line_range is zero

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 03:22:58 PST 2018


jhenderson planned changes to this revision.
jhenderson added a comment.

In https://reviews.llvm.org/D43470#1012578, @JDevlieghere wrote:

> IMHO, since these "warnings" effectively abort parsing, the right thing to do here is returning an `llvm::error` which can then be printed by the verifier.


Having thought about this a bit and played around, I'm inclined to agree that this is the correct approach. It'll be a bigger change, but it will make the code more amenable to being used as a library, where the consumers can decide what to do with the errors/warnings on a case-by-case basis. I'll experiment with it a bit more, and then upload an updated patch.


Repository:
  rL LLVM

https://reviews.llvm.org/D43470





More information about the llvm-commits mailing list