[all-commits] [llvm/llvm-project] a225aa: [DenseMap] Invalidate iterators on erase (#199369)
Fangrui Song via All-commits
all-commits at lists.llvm.org
Tue May 26 00:08:33 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a225aafbd1a40be0dd9c31e2d0b0b7c42b9d36e3
https://github.com/llvm/llvm-project/commit/a225aafbd1a40be0dd9c31e2d0b0b7c42b9d36e3
Author: Fangrui Song <i at maskray.me>
Date: 2026-05-26 (Tue, 26 May 2026)
Changed paths:
M llvm/docs/ProgrammersManual.rst
M llvm/docs/ReleaseNotes.md
M llvm/include/llvm/ADT/DenseMap.h
M llvm/unittests/ADT/DenseMapTest.cpp
M llvm/unittests/ADT/DenseSetTest.cpp
Log Message:
-----------
[DenseMap] Invalidate iterators on erase (#199369)
Tighten DenseMap's `erase` contract so that, like `insert` and `grow`,
it invalidates iterators and references obtained before the call.
Under the current tombstone-based deletion this is purely an
LLVM_ENABLE_ABI_BREAKING_CHECKS check — the bucket array is not actually
mutated for other entries — but it surfaces stale-iterator-after-erase
patterns now rather than when DenseMap's deletion scheme changes.
Mirrors the SmallPtrSet change in #96762, which dropped tombstones in
small mode and likewise had `erase` invalidate iterators.
Depends on #198982 and #199365
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list