[PATCH] D69672: DWARFDebugLoclists: Move to a incremental parsing model

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 6 07:22:20 PST 2019


labath added a comment.

In D69672#1734182 <https://reviews.llvm.org/D69672#1734182>, @JDevlieghere wrote:

> Personally I'm not a big fan of callbacks, but it seems like this was well thought through. My original suggestion of doing a two-step parse also wouldn't allow you to abort parsing, which is possible here by returning false form the callback.


Ah, I now fully understand what you meant on the other diff. Yes, being able to abort parsing part-way (along avoiding materializing the full list) is one of the benefits of this approach -- or at least, it makes it fit well into the way it is currently used from lldb. Though in practice, I don't expect that to matter much, as individual location lists are small [citation needed]. I'm not a fan of callbacks either, and if this had/will have more users, I'd go for turning these into iterators -- it's just that writing iterators is cumbersome (when can we have coroutines?), so it's not clear if it's worth the trouble.

> LGTM

Thanks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69672/new/

https://reviews.llvm.org/D69672





More information about the llvm-commits mailing list