[PATCH] D32235: VarStreamArrayIterator needed non-const operator* overload

Adrian McCarthy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 20 12:48:02 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL300877: VarStreamArrayIterator needed non-const operator* overload. (authored by amccarth).

Changed prior to commit:
  https://reviews.llvm.org/D32235?vs=95998&id=96004#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D32235

Files:
  llvm/trunk/include/llvm/Support/BinaryStreamArray.h


Index: llvm/trunk/include/llvm/Support/BinaryStreamArray.h
===================================================================
--- llvm/trunk/include/llvm/Support/BinaryStreamArray.h
+++ llvm/trunk/include/llvm/Support/BinaryStreamArray.h
@@ -162,6 +162,11 @@
     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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32235.96004.patch
Type: text/x-patch
Size: 532 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170420/114d54cf/attachment.bin>


More information about the llvm-commits mailing list