summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-11-28 07:21:48 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-11-28 07:21:48 +0000
commit9a08ca318e63912e4c19977abc1173f30866b704 (patch)
treecb79c780102d035f01268d14331491603e0a4643 /include
parent180e1247ca330b047eabafbc72926ce9bfd8bf8e (diff)
downloadllvm-9a08ca318e63912e4c19977abc1173f30866b704.tar.gz
llvm-9a08ca318e63912e4c19977abc1173f30866b704.tar.bz2
llvm-9a08ca318e63912e4c19977abc1173f30866b704.tar.xz
Add default constructors for iterators.
These iterators don't point anywhere, and they can't be compared to anything. They are only good for assigning to. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120239 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/IntervalMap.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/ADT/IntervalMap.h b/include/llvm/ADT/IntervalMap.h
index bf8dee6f3a..2bd885cf8a 100644
--- a/include/llvm/ADT/IntervalMap.h
+++ b/include/llvm/ADT/IntervalMap.h
@@ -1397,6 +1397,9 @@ protected:
void treeAdvanceTo(KeyT x);
public:
+ /// const_iterator - Create an iterator that isn't pointing anywhere.
+ const_iterator() : map(0) {}
+
/// valid - Return true if the current position is valid, false for end().
bool valid() const { return path.valid(); }
@@ -1583,6 +1586,9 @@ class IntervalMap<KeyT, ValT, N, Traits>::iterator : public const_iterator {
void eraseNode(unsigned Level);
void treeErase(bool UpdateRoot = true);
public:
+ /// iterator - Create null iterator.
+ iterator() {}
+
/// insert - Insert mapping [a;b] -> y before the current position.
void insert(KeyT a, KeyT b, ValT y);