[llvm] r343770 - [doc] Update the programmer's manual about SmallSet's iterator
Kristof Umann via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 4 05:33:34 PDT 2018
Author: szelethus
Date: Thu Oct 4 05:33:33 2018
New Revision: 343770
URL: http://llvm.org/viewvc/llvm-project?rev=343770&view=rev
Log:
[doc] Update the programmer's manual about SmallSet's iterator
Since rL337818, you can now iterate the SmallSet.
Differential Revision: https://reviews.llvm.org/D52828
Modified:
llvm/trunk/docs/ProgrammersManual.rst
Modified: llvm/trunk/docs/ProgrammersManual.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ProgrammersManual.rst?rev=343770&r1=343769&r2=343770&view=diff
==============================================================================
--- llvm/trunk/docs/ProgrammersManual.rst (original)
+++ llvm/trunk/docs/ProgrammersManual.rst Thu Oct 4 05:33:33 2018
@@ -1872,9 +1872,7 @@ to :ref:`std::set <dss_set>`, but for po
:ref:`SmallPtrSet <dss_smallptrset>`.
The magic of this class is that it handles small sets extremely efficiently, but
-gracefully handles extremely large sets without loss of efficiency. The
-drawback is that the interface is quite small: it supports insertion, queries
-and erasing, but does not support iteration.
+gracefully handles extremely large sets without loss of efficiency.
.. _dss_smallptrset:
@@ -1882,11 +1880,11 @@ llvm/ADT/SmallPtrSet.h
^^^^^^^^^^^^^^^^^^^^^^
``SmallPtrSet`` has all the advantages of ``SmallSet`` (and a ``SmallSet`` of
-pointers is transparently implemented with a ``SmallPtrSet``), but also supports
-iterators. If more than N insertions are performed, a single quadratically
-probed hash table is allocated and grows as needed, providing extremely
-efficient access (constant time insertion/deleting/queries with low constant
-factors) and is very stingy with malloc traffic.
+pointers is transparently implemented with a ``SmallPtrSet``). If more than N
+insertions are performed, a single quadratically probed hash table is allocated
+and grows as needed, providing extremely efficient access (constant time
+insertion/deleting/queries with low constant factors) and is very stingy with
+malloc traffic.
Note that, unlike :ref:`std::set <dss_set>`, the iterators of ``SmallPtrSet``
are invalidated whenever an insertion occurs. Also, the values visited by the
More information about the llvm-commits
mailing list