Skip to content

Commit

Permalink
VarStreamArrayIterator needed non-const operator* overload.
Browse files Browse the repository at this point in the history
Without this change, the operator-> provided by iterator_facade lost type
qualifiers.

Differential Revision: https://reviews.llvm.org/D32235

llvm-svn: 300877
  • Loading branch information
amccarth-google committed Apr 20, 2017
1 parent 0ec3f2f commit 175d70e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions llvm/include/llvm/Support/BinaryStreamArray.h
Expand Up @@ -162,6 +162,11 @@ class VarStreamArrayIterator
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
Expand Down

0 comments on commit 175d70e

Please sign in to comment.