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

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 03:50:49 PST 2018


JDevlieghere added a comment.

In https://reviews.llvm.org/D43470#1013034, @jhenderson wrote:

> 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.


Great, thanks!


Repository:
  rL LLVM

https://reviews.llvm.org/D43470





More information about the llvm-commits mailing list