[PATCH] D152947: [DebugInfo] Change DWARFDebugAbbrev initialization

Felipe de Azevedo Piovezan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 17 06:31:49 PDT 2023


fdeazeve added a comment.

> using lazy fallible iterators might be suitable:

@bulbazord, if you end up using these, let's chat as I'd love to understand them better. To name a couple of things that puzzled me, it exposes these methods:

  /// Construct a fallible iterator that *cannot* be used as an end-of-range
  /// value.
  static fallible_iterator itr(Underlying I, Error &Err) {
  
  /// Construct a fallible iterator that can be used as an end-of-range value.
  /// A value created by this method can be dereferenced (if the underlying
  /// value points at a valid value)
  static fallible_iterator end(Underlying I) {

Not being able to construct a "begin" that is also "end" seems counter-intuitive (iterators often test emptiness through begin==end). Similarly, constructing an "end" that can be dereferenced is not usual? In the process of asking these questions, I think I now know the answer, but I don't want to bias your investigation ;)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152947



More information about the llvm-commits mailing list