mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Support: Add postincrement and include guards to LineIterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204279 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f2a52c372d
commit
eb7dcd71d6
@ -7,6 +7,9 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_SUPPORT_LINEITERATOR_H__
|
||||
#define LLVM_SUPPORT_LINEITERATOR_H__
|
||||
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include <iterator>
|
||||
|
||||
@ -53,6 +56,11 @@ public:
|
||||
advance();
|
||||
return *this;
|
||||
}
|
||||
line_iterator operator++(int) {
|
||||
line_iterator tmp(*this);
|
||||
advance();
|
||||
return tmp;
|
||||
}
|
||||
|
||||
/// \brief Get the current line as a \c StringRef.
|
||||
StringRef operator*() const { return CurrentLine; }
|
||||
@ -72,3 +80,5 @@ private:
|
||||
void advance();
|
||||
};
|
||||
}
|
||||
|
||||
#endif // LLVM_SUPPORT_LINEITERATOR_H__
|
||||
|
Loading…
Reference in New Issue
Block a user