[llvm] r248447 - Add iterator_range::end() predicate.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 16:58:29 PDT 2015


Author: ruiu
Date: Wed Sep 23 18:58:29 2015
New Revision: 248447

URL: http://llvm.org/viewvc/llvm-project?rev=248447&view=rev
Log:
Add iterator_range::end() predicate.

Modified:
    llvm/trunk/include/llvm/ADT/iterator_range.h

Modified: llvm/trunk/include/llvm/ADT/iterator_range.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/iterator_range.h?rev=248447&r1=248446&r2=248447&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/iterator_range.h (original)
+++ llvm/trunk/include/llvm/ADT/iterator_range.h Wed Sep 23 18:58:29 2015
@@ -45,6 +45,7 @@ public:
 
   IteratorT begin() const { return begin_iterator; }
   IteratorT end() const { return end_iterator; }
+  bool empty() const { return begin_iterator == end_iterator; }
 };
 
 /// \brief Convenience function for iterating over sub-ranges.




More information about the llvm-commits mailing list