<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/111707>111707</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Document iterator and object reference validity for LLVM ADTs
</td>
</tr>
<tr>
<th>Labels</th>
<td>
documentation
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jurahul
</td>
</tr>
</table>
<pre>
This issue track adding documentation to clarify iterator and object reference validity for LLVM ADTs like `DenseMap` and others. Please see https://kera.name/articles/2011/06/iterator-invalidation-rules-c0x/ for an example of this for C++. For each container defined in LLVM's ADT library, we should document:
- Iterator validity rules
- Object reference validity rules
This should be both in the C++ headers for these containers as well as LLVM's Programmers Manual. In addition, it may be useful to summarize the use case of a persistent cache (see https://discourse.llvm.org/t/densemap-vs-std-map-for-cache/82436/7) in an additional bullet point in https://llvm.org/docs/ProgrammersManual.html#picking-the-right-data-structure-for-a-task.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyck0-P2zgMxT-NfCFsyMpfH3zoNDBQoIPtodg7LdORGlkKJGo62U-_kCfzD4u99GIHoaX3fo8kpmTPnqgXuwexO1WY2YTY_8oRTXbVGKZb_9PYBDalTMAR9QVwmqw_wxR0Xsgzsg0eOIB2GO18A8sUkUME9BOE8RdphkgzRfKa4AmdnSzfYA4Rvn__-xG-nH4mcPZCIPbyRD7RI17FXr6cZ0MxNfDDESaCRASG-ZrE5otQg1DDhSI2HhcSasDIVjtKQg1Ktq1Qg9wLNbwaqq1f1VfHdcyOUq3ls1DDagY90DMuV0cQZuCCXf7-KtSDUA8NDCECoTagg2e0niJMNFtPE1i_ogh1SAUHnB0jxptQX-E3QTIhu-ktsGJdnoS8P2v49hrYWzart9fyX_8b4YfPXp5rr-5yI8EY2BRvbOgVAwzhRPEFjQ0lesdJgAl-k3Pl_cbzI4ZzxGUp9Uf0GV0D3_w6BSXHwmgZFrwVxZxozq5MQ8rLgtH-Q6t6LjqlgWEGhCvFZBOTZ9CoDYFQx_92drJJhxwTNc49LU2IZ6EGLoUyIwte66dUJ57q8nMOsV7vEmo4qu2m9P0gVFfw8d0tOhizc8RwDdZzqX4W_SA1BV0m6QP_Hd_w4oTaXK2-WH-u2VAd7dlwPSFjnThmzTnS6glrxnRpqqnfTN2mw4r69qCO204q1VWmnzdynrv5cDzKYydVux-3Oy33u0mOGxxxX9leSbVtpezafStV14x7OXfbrTronVKKdmIraUHr3lKq1mXt27Y9yEPlcCSX1gVX6tPOCqXKzse-HKzHfE5iK51NnN6vYsuO-tP92B-tdpWj6z-HfLZs8tjosNwTv7_qawzlzrKzhaHEf8d46tW_AQAA__9INZIb">