aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/ilist.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/ADT/ilist.h b/include/llvm/ADT/ilist.h
index 8d9bab5..41253e0 100644
--- a/include/llvm/ADT/ilist.h
+++ b/include/llvm/ADT/ilist.h
@@ -93,6 +93,10 @@ public:
typedef typename super::reference reference;
private:
pointer NodePtr;
+
+ // operator[] is not defined. Compile error instead of having a runtime bug.
+ void operator[](unsigned) {}
+ void operator[](unsigned) const {}
public:
ilist_iterator(pointer NP) : NodePtr(NP) {}