[all-commits] [llvm/llvm-project] 055c67: [StringMap] Invalidate iterators on mutation (#202...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Mon Jun 8 10:10:39 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 055c6721526d29059857ba7887e7cde87e00bf9c
https://github.com/llvm/llvm-project/commit/055c6721526d29059857ba7887e7cde87e00bf9c
Author: Fangrui Song <i at maskray.me>
Date: 2026-06-08 (Mon, 08 Jun 2026)
Changed paths:
M llvm/docs/ProgrammersManual.rst
M llvm/docs/ReleaseNotes.md
M llvm/include/llvm/ADT/StringMap.h
M llvm/unittests/ADT/StringMapTest.cpp
Log Message:
-----------
[StringMap] Invalidate iterators on mutation (#202237)
Tighten StringMap's iterator contract so that, like DenseMap (#199369),
mutating the map invalidates iterators obtained before the call.
StringMap
now derives from DebugEpochBase and its iterators from HandleBase, and
insert/erase/clear/swap bump the epoch, so a
stale-iterator-after-mutation
bug (e.g. erase- or insert-while-iterating) fails under
LLVM_ENABLE_ABI_BREAKING_CHECKS.
In release builds DebugEpochBase/HandleBase are empty, so iterator size
and
codegen are unchanged.
Aided by Claude Opus 4.8
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