[all-commits] [llvm/llvm-project] 9d9843: [StringMap] Invalidate iterators in remove() (#203...

Fangrui Song via All-commits all-commits at lists.llvm.org
Thu Jun 11 05:21:19 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9d98437fffe4cef9435d7202ecd4b3c88fdbb7ae
      https://github.com/llvm/llvm-project/commit/9d98437fffe4cef9435d7202ecd4b3c88fdbb7ae
  Author: Fangrui Song <i at maskray.me>
  Date:   2026-06-11 (Thu, 11 Jun 2026)

  Changed paths:
    M llvm/include/llvm/ADT/StringMap.h
    M llvm/lib/Transforms/IPO/StripSymbols.cpp
    M llvm/unittests/ADT/StringMapTest.cpp

  Log Message:
  -----------
  [StringMap] Invalidate iterators in remove() (#203249)

erase() bumps the epoch to invalidate iterators (#202237), but the
lower-level remove() — which detaches an entry without destroying it,
used
by ValueSymbolTable via Value::setName() — did not. Move the
incrementEpoch() into remove() so remove-while-iterating fails fast
under
LLVM_ENABLE_ABI_BREAKING_CHECKS too.

Aided by Claude Opus 4.8
Reland after lldb fix #203035



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