summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-02-09 22:40:50 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-02-09 22:40:50 +0000
commit71be6db3efd233ae7eafe3e23ad9d9ac70bf0706 (patch)
tree3c90b4055bfd2d9b9e1f509c334afbb9efe0fc0e
parentccb2a677aff9c038b119d74f4c62295e2c4adef4 (diff)
downloadllvm-71be6db3efd233ae7eafe3e23ad9d9ac70bf0706.tar.gz
llvm-71be6db3efd233ae7eafe3e23ad9d9ac70bf0706.tar.bz2
llvm-71be6db3efd233ae7eafe3e23ad9d9ac70bf0706.tar.xz
Add global methods that prevent us from using ilist::iterators as
random access iterators. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11248 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/Support/ilist12
-rw-r--r--include/llvm/ADT/ilist12
2 files changed, 24 insertions, 0 deletions
diff --git a/include/Support/ilist b/include/Support/ilist
index fda57c5fa7..bfa601f9c9 100644
--- a/include/Support/ilist
+++ b/include/Support/ilist
@@ -156,6 +156,18 @@ public:
pointer getNodePtrUnchecked() const { return NodePtr; }
};
+// do not implement. this is to catch errors when people try to use
+// them as random access iterators
+template<typename T>
+void operator-(int, ilist_iterator<T>);
+template<typename T>
+void operator-(ilist_iterator<T>,int);
+
+template<typename T>
+void operator+(int, ilist_iterator<T>);
+template<typename T>
+void operator+(ilist_iterator<T>,int);
+
//===----------------------------------------------------------------------===//
// ilist_compat_iterator<Node> - Compatibility iterator for intrusive list.
// This makes an ilist<X> act like an std::list<X*>, where you have to
diff --git a/include/llvm/ADT/ilist b/include/llvm/ADT/ilist
index fda57c5fa7..bfa601f9c9 100644
--- a/include/llvm/ADT/ilist
+++ b/include/llvm/ADT/ilist
@@ -156,6 +156,18 @@ public:
pointer getNodePtrUnchecked() const { return NodePtr; }
};
+// do not implement. this is to catch errors when people try to use
+// them as random access iterators
+template<typename T>
+void operator-(int, ilist_iterator<T>);
+template<typename T>
+void operator-(ilist_iterator<T>,int);
+
+template<typename T>
+void operator+(int, ilist_iterator<T>);
+template<typename T>
+void operator+(ilist_iterator<T>,int);
+
//===----------------------------------------------------------------------===//
// ilist_compat_iterator<Node> - Compatibility iterator for intrusive list.
// This makes an ilist<X> act like an std::list<X*>, where you have to