aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/LTO/LTOBackend.cpp
diff options
context:
space:
mode:
authorMingming Liu <mingmingl@google.com>2024-05-19 22:42:18 -0700
committerGitHub <noreply@github.com>2024-05-19 22:42:18 -0700
commit6b0733e3a35350679ea9c6056ecd28652d99017f (patch)
tree9650b31f614af77ca039947c34793ea6e78a832a /llvm/lib/LTO/LTOBackend.cpp
parentb6e102e08cd35543175459494211a3a15f793302 (diff)
downloadllvm-6b0733e3a35350679ea9c6056ecd28652d99017f.zip
llvm-6b0733e3a35350679ea9c6056ecd28652d99017f.tar.gz
llvm-6b0733e3a35350679ea9c6056ecd28652d99017f.tar.bz2
Revert "[ThinLTO] Populate declaration import status except for distributed ThinLTO under a default-off new option" (#92715)
Reverts llvm/llvm-project#88024 Build bot failures (https://lab.llvm.org/buildbot/#/builders/259/builds/4727 and https://lab.llvm.org/buildbot/#/builders/9/builds/43876)
Diffstat (limited to 'llvm/lib/LTO/LTOBackend.cpp')
-rw-r--r--llvm/lib/LTO/LTOBackend.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index 58434fe..d4b89ed 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -721,14 +721,7 @@ bool lto::initImportList(const Module &M,
if (Summary->modulePath() == M.getModuleIdentifier())
continue;
// Add an entry to provoke importing by thinBackend.
- // Try emplace the entry first. If an entry with the same key already
- // exists, set the value to 'std::min(existing-value, new-value)' to make
- // sure a definition takes precedence over a declaration.
- auto [Iter, Inserted] = ImportList[Summary->modulePath()].try_emplace(
- GUID, Summary->importType());
-
- if (!Inserted)
- Iter->second = std::min(Iter->second, Summary->importType());
+ ImportList[Summary->modulePath()].insert(GUID);
}
}
return true;