aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/LTO/LTOBackend.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2024-08-22 21:56:01 -0700
committerGitHub <noreply@github.com>2024-08-22 21:56:01 -0700
commit3563907969843cb5d97995fb02177ee578e33aa2 (patch)
treebc6741610d97ad866d3a15d9a8405b0ff34d81e8 /llvm/lib/LTO/LTOBackend.cpp
parent7c3237d778572931ff097e81df43d0bce9d1d4f8 (diff)
downloadllvm-3563907969843cb5d97995fb02177ee578e33aa2.zip
llvm-3563907969843cb5d97995fb02177ee578e33aa2.tar.gz
llvm-3563907969843cb5d97995fb02177ee578e33aa2.tar.bz2
[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/.
Diffstat (limited to 'llvm/lib/LTO/LTOBackend.cpp')
-rw-r--r--llvm/lib/LTO/LTOBackend.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index ae46d94..4e58cd3 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -726,8 +726,7 @@ bool lto::initImportList(const Module &M,
if (Summary->modulePath() == M.getModuleIdentifier())
continue;
// Add an entry to provoke importing by thinBackend.
- FunctionImporter::addGUID(ImportList, Summary->modulePath(), GUID,
- Summary->importType());
+ ImportList.addGUID(Summary->modulePath(), GUID, Summary->importType());
}
}
return true;