[all-commits] [llvm/llvm-project] 356390: [LTO] Turn ImportMapTy into a proper class (NFC) (...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Thu Aug 22 21:56:23 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3563907969843cb5d97995fb02177ee578e33aa2
      https://github.com/llvm/llvm-project/commit/3563907969843cb5d97995fb02177ee578e33aa2
  Author: Kazu Hirata <kazu at google.com>
  Date:   2024-08-22 (Thu, 22 Aug 2024)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/FunctionImport.h
    M llvm/lib/LTO/LTO.cpp
    M llvm/lib/LTO/LTOBackend.cpp
    M llvm/lib/Transforms/IPO/FunctionImport.cpp
    M llvm/tools/llvm-link/llvm-link.cpp

  Log Message:
  -----------
  [LTO] Turn ImportMapTy into a proper class (NFC) (#105748)

This patch turns type alias ImportMapTy into a proper class to provide
a more intuitive interface like:

  ImportList.addDefinition(...)

as opposed to:

  FunctionImporter::addDefinition(ImportList, ...)

Also, this patch requires all non-const accesses to go through
addDefinition, maybeAddDeclaration, and addGUID while providing const
accesses via:

  const ImportMapTyImpl &getImportMap() const { return ImportMap; }

I realize ImportMapTy may not be the best name as a class (maybe OK as
a type alias).  I am not renaming ImportMapTy in this patch at least
because there are 47 mentions of ImportMapTy under llvm/.



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