diff --git a/llvm/include/llvm/Support/BinaryStreamArray.h b/llvm/include/llvm/Support/BinaryStreamArray.h --- a/llvm/include/llvm/Support/BinaryStreamArray.h +++ b/llvm/include/llvm/Support/BinaryStreamArray.h @@ -153,7 +153,7 @@ template class VarStreamArrayIterator : public iterator_facade_base, - std::forward_iterator_tag, ValueType> { + std::forward_iterator_tag, const ValueType> { typedef VarStreamArrayIterator IterType; typedef VarStreamArray ArrayType; @@ -197,11 +197,6 @@ return ThisValue; } - ValueType &operator*() { - assert(Array && !HasError); - return ThisValue; - } - IterType &operator+=(unsigned N) { for (unsigned I = 0; I < N; ++I) { // We are done with the current record, discard it so that we are diff --git a/llvm/tools/llvm-pdbutil/ExplainOutputStyle.cpp b/llvm/tools/llvm-pdbutil/ExplainOutputStyle.cpp --- a/llvm/tools/llvm-pdbutil/ExplainOutputStyle.cpp +++ b/llvm/tools/llvm-pdbutil/ExplainOutputStyle.cpp @@ -373,7 +373,7 @@ ++Index; } - DbiModuleDescriptor &Descriptor = *Prev; + const DbiModuleDescriptor &Descriptor = *Prev; P.formatLine("which contains the descriptor for module {0} ({1}).", Index, Descriptor.getModuleName()); }