diff options
author | Adrian McCarthy <amccarth@google.com> | 2017-04-20 19:34:06 +0000 |
---|---|---|
committer | Adrian McCarthy <amccarth@google.com> | 2017-04-20 19:34:06 +0000 |
commit | 175d70ee5c2f03f640151488f5f33b7bd9b96f8d (patch) | |
tree | 3ee08f982d2325ee9677b880c75b1fc6a79b4b69 | |
parent | 0ec3f2f39a2dd0a8dccd9161c30a0137972fa551 (diff) | |
download | bcm5719-llvm-175d70ee5c2f03f640151488f5f33b7bd9b96f8d.tar.gz bcm5719-llvm-175d70ee5c2f03f640151488f5f33b7bd9b96f8d.zip |
VarStreamArrayIterator needed non-const operator* overload.
Without this change, the operator-> provided by iterator_facade lost type
qualifiers.
Differential Revision: https://reviews.llvm.org/D32235
llvm-svn: 300877
-rw-r--r-- | llvm/include/llvm/Support/BinaryStreamArray.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/BinaryStreamArray.h b/llvm/include/llvm/Support/BinaryStreamArray.h index 3b1301d3cc0..21b2474660f 100644 --- a/llvm/include/llvm/Support/BinaryStreamArray.h +++ b/llvm/include/llvm/Support/BinaryStreamArray.h @@ -162,6 +162,11 @@ public: 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 |