Open
Description
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
- Specifically for associative containers, we need to explicitly document:
- Object reference validity for both keys and values
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.