From: Adrian McCarthy Date: Thu, 20 Apr 2017 19:34:06 +0000 (+0000) Subject: VarStreamArrayIterator needed non-const operator* overload. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=175d70ee5c2f03f640151488f5f33b7bd9b96f8d;p=platform%2Fupstream%2Fllvm.git 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 --- diff --git a/llvm/include/llvm/Support/BinaryStreamArray.h b/llvm/include/llvm/Support/BinaryStreamArray.h index 3b1301d..21b2474 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