17 if (*
P ==
'\r' && *(
P + 1) ==
'\n')
27 if (*
P ==
'\r' && *(
P + 1) ==
'\n') {
36 :
line_iterator(Buffer.getMemBufferRef(), SkipBlanks, CommentMarker) {}
42 CommentMarker(CommentMarker), SkipBlanks(SkipBlanks),
43 CurrentLine(Buffer.getBufferSize() ? Buffer.getBufferStart() : nullptr,
55void line_iterator::advance() {
56 assert(Buffer &&
"Cannot advance past the end!");
58 const char *Pos = CurrentLine.
end();
65 }
else if (CommentMarker ==
'\0') {
74 if (*Pos == CommentMarker)
86 Buffer = std::nullopt;
static bool skipIfAtLineEnd(const char *&P)
static bool isAtLineEnd(const char *P)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
size_t getBufferSize() const
const char * getBufferStart() const
const char * getBufferEnd() const
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.
A forward iterator which reads text lines from a buffer.
line_iterator()=default
Default construct an "end" iterator.
This is an optimization pass for GlobalISel generic memory operations.
Implement std::hash so that hash_code can be used in STL containers.