[all-commits] [llvm/llvm-project] 0341fb: [ThinLTO] Avoid creating map entries on lookup (NF...

Teresa Johnson via All-commits all-commits at lists.llvm.org
Thu Oct 23 19:41:04 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0341fb63f2abe2ce98434c45fef8826718f9198c
      https://github.com/llvm/llvm-project/commit/0341fb63f2abe2ce98434c45fef8826718f9198c
  Author: Teresa Johnson <tejohnson at google.com>
  Date:   2025-10-23 (Thu, 23 Oct 2025)

  Changed paths:
    M llvm/include/llvm/LTO/LTO.h
    M llvm/lib/LTO/LTO.cpp

  Log Message:
  -----------
  [ThinLTO] Avoid creating map entries on lookup (NFCI) (#164873)

We could inadvertently create new entries in the PrevailingModuleForGUID
map during lookup, which was always using operator[]. In most cases we
will have one for external symbols, but not in cases where the
prevailing copy is in a native object. Or if this happened to be looked
up for a local.

Make the map private and create and use accessors.



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