From: Justin Bogner Date: Wed, 19 Mar 2014 22:58:31 +0000 (+0000) Subject: Support: Add postincrement and include guards to LineIterator X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=eb7dcd71d6067f66da8c930435effbe40500495d;p=oota-llvm.git 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 --- diff --git a/include/llvm/Support/LineIterator.h b/include/llvm/Support/LineIterator.h index 92a9cc5c574..7077656da67 100644 --- a/include/llvm/Support/LineIterator.h +++ b/include/llvm/Support/LineIterator.h @@ -7,6 +7,9 @@ // //===----------------------------------------------------------------------===// +#ifndef LLVM_SUPPORT_LINEITERATOR_H__ +#define LLVM_SUPPORT_LINEITERATOR_H__ + #include "llvm/ADT/StringRef.h" #include @@ -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__