<div dir="ltr">Ping<br><div class="gmail_quote"><div dir="ltr">On Mon, May 8, 2017 at 11:43 AM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Test coverage?</div><br><div class="gmail_quote"><div dir="ltr">On Fri, May 5, 2017 at 10:27 AM Adrian McCarthy via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: amccarth<br>
Date: Fri May  5 12:14:00 2017<br>
New Revision: 302257<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=302257&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=302257&view=rev</a><br>
Log:<br>
Allow operator-> to work from a FixedStreamArrayIterator.<br>
<br>
This is similar to my recent fix for VarStreamArrayIterator, but the cause<br>
(and thus the fix) is subtley different.  The FixedStreamArrayIterator<br>
iterates over a const Array, so the iterator's value type must be const.<br>
<br>
Modified:<br>
    llvm/trunk/include/llvm/Support/BinaryStreamArray.h<br>
<br>
Modified: llvm/trunk/include/llvm/Support/BinaryStreamArray.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/BinaryStreamArray.h?rev=302257&r1=302256&r2=302257&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/BinaryStreamArray.h?rev=302257&r1=302256&r2=302257&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/Support/BinaryStreamArray.h (original)<br>
+++ llvm/trunk/include/llvm/Support/BinaryStreamArray.h Fri May  5 12:14:00 2017<br>
@@ -342,7 +342,7 @@ private:<br>
 template <typename T><br>
 class FixedStreamArrayIterator<br>
     : public iterator_facade_base<FixedStreamArrayIterator<T>,<br>
-                                  std::random_access_iterator_tag, T> {<br>
+                                  std::random_access_iterator_tag, const T> {<br>
<br>
 public:<br>
   FixedStreamArrayIterator(const FixedStreamArray<T> &Array, uint32_t Index)<br>
@@ -356,6 +356,7 @@ public:<br>
   }<br>
<br>
   const T &operator*() const { return Array[Index]; }<br>
+  const T &operator*() { return Array[Index]; }<br>
<br>
   bool operator==(const FixedStreamArrayIterator<T> &R) const {<br>
     assert(Array == R.Array);<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></blockquote></div></div>