10 #ifndef LLVM_SUPPORT_LINEITERATOR_H 11 #define LLVM_SUPPORT_LINEITERATOR_H 33 :
public std::iterator<std::forward_iterator_tag, StringRef> {
47 char CommentMarker =
'\0');
74 return LHS.Buffer == RHS.Buffer &&
75 LHS.CurrentLine.
begin() == RHS.CurrentLine.
begin();
friend bool operator!=(const line_iterator &LHS, const line_iterator &RHS)
This class represents lattice values for constants.
A forward iterator which reads text lines from a buffer.
bool is_at_end() const
Return true if we're an "end" iterator or have reached EOF.
friend bool operator==(const line_iterator &LHS, const line_iterator &RHS)
bool is_at_eof() const
Return true if we've reached EOF or are an "end" iterator.
line_iterator()
Default construct an "end" iterator.
int64_t line_number() const
Return the current line number. May return any number at EOF.
line_iterator operator++(int)
line_iterator & operator++()
Advance to the next (non-empty, non-comment) line.
StringRef operator*() const
Get the current line as a StringRef.
This interface provides simple read-only access to a block of memory, and provides simple methods for...
StringRef - Represent a constant reference to a string, i.e.
const StringRef * operator->() const