<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 30, 2016 at 3:31 PM, Matthias Braun via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">MatzeB added a comment.<br>
<span class=""><br>
In <a href="http://reviews.llvm.org/D18579#386552" rel="noreferrer" target="_blank">http://reviews.llvm.org/D18579#386552</a>, @dblaikie wrote:<br>
<br>
> Test cases?<br>
>  Got use cases in mind? (specific new/incoming patches to LLVM projects that<br>
>  will use this functionality)<br>
<br>
<br>
</span>See <a href="http://reviews.llvm.org/D18427" rel="noreferrer" target="_blank">http://reviews.llvm.org/D18427</a><br>
<span class=""><br>
> & 'resize' seems like the wrong name for a set or map operation - perhaps<br>
<br>
>  "reserve"? (I think there was a recent change for this rename in DenseMap,<br>
<br>
>  right?)<br>
<br>
<br>
</span>It is still called resize() in DenseSet, SmallPtrSet and BitVector so I'd like to keep that name for consistency. Of course someone else can rename them all to reserve() in the future.<br></blockquote><div><br></div><div>BitVector, PackedVector, SmallBitVector, SmallVector, IndexedMap, and DenseMap all have 'reserve'<br>BitVector, PackedVector, SmallBitVector, SmallVector, IndexedMap, DenseSet, and ilist all have 'resize'</div><div><br>Looks like BitVector's resize and reserve are different (one just grows the capacity, the other actually changes the size and adds unset bits) - as one would expect.<br><br>PackedVector just delegates to its underlying BitVectorTy<br><br>SmallBitVector implements resize and reserve differently - like BItVector<br><br>SmallVector implements them differently, like std::vector, etc<br><br>IndexedMap delegates both<br><br>DenseMap has no resize, only reserve, which would be consistent with the STL.<br><br>I don't see a resize in SmallPtrSet<br><br>Pretty sure the cases where resize actually means reserve are in the minority & we'd want fewer rather than more.<br><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class="im"><br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D18579" rel="noreferrer" target="_blank">http://reviews.llvm.org/D18579</a><br>
<br>
<br>
<br>
</span><div class=""><div class="h5">_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">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>
</div></div></blockquote></div><br></div></div>