[llvm] r204279 - Support: Add postincrement and include guards to LineIterator

Justin Bogner mail at justinbogner.com
Wed Mar 19 15:58:31 PDT 2014


Author: bogner
Date: Wed Mar 19 17:58:31 2014
New Revision: 204279

URL: http://llvm.org/viewvc/llvm-project?rev=204279&view=rev
Log:
Support: Add postincrement and include guards to LineIterator

Modified:
    llvm/trunk/include/llvm/Support/LineIterator.h

Modified: llvm/trunk/include/llvm/Support/LineIterator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/LineIterator.h?rev=204279&r1=204278&r2=204279&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/LineIterator.h (original)
+++ llvm/trunk/include/llvm/Support/LineIterator.h Wed Mar 19 17:58:31 2014
@@ -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__





More information about the llvm-commits mailing list