Index: include/llvm/ADT/DenseSet.h =================================================================== --- include/llvm/ADT/DenseSet.h +++ include/llvm/ADT/DenseSet.h @@ -104,6 +104,7 @@ Iterator(const typename MapTy::iterator &i) : I(i) {} ValueT &operator*() { return I->getFirst(); } + const ValueT &operator*() const { return I->getFirst(); } ValueT *operator->() { return &I->getFirst(); } Iterator& operator++() { ++I; return *this; } @@ -125,7 +126,7 @@ ConstIterator(const typename MapTy::const_iterator &i) : I(i) {} - const ValueT &operator*() { return I->getFirst(); } + const ValueT &operator*() const { return I->getFirst(); } const ValueT *operator->() { return &I->getFirst(); } ConstIterator& operator++() { ++I; return *this; }