[all-commits] [llvm/llvm-project] 4b7ec0: [GlobalsModRef] Don't erase while iterating (#199656)

Guy David via All-commits all-commits at lists.llvm.org
Tue May 26 09:40:13 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4b7ec0c715398d970a2669573f931e167b532e75
      https://github.com/llvm/llvm-project/commit/4b7ec0c715398d970a2669573f931e167b532e75
  Author: Guy David <guyda96 at gmail.com>
  Date:   2026-05-26 (Tue, 26 May 2026)

  Changed paths:
    M llvm/lib/Analysis/GlobalsModRef.cpp

  Log Message:
  -----------
  [GlobalsModRef] Don't erase while iterating (#199656)

The loop erases from AllocsForIndirectGlobals while walking it, which
now hits the iterator invalidation assert in DenseMap::erase. Use
remove_if instead.

Started with https://github.com/llvm/llvm-project/pull/199369.



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