summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Utils/FunctionImportUtils.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp b/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
index 6b5f593073b..bf6cce96f49 100644
--- a/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
+++ b/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp
@@ -206,16 +206,8 @@ void FunctionImportGlobalProcessing::processGlobalForThinLTO(GlobalValue &GV) {
// definition.
if (GV.hasName()) {
ValueInfo VI = ImportIndex.getValueInfo(GV.getGUID());
- if (VI) {
- // Need to check all summaries are local in case of hash collisions.
- bool IsLocal = VI.getSummaryList().size() &&
- llvm::all_of(VI.getSummaryList(),
- [](const std::unique_ptr<GlobalValueSummary> &Summary) {
- return Summary->isDSOLocal();
- });
- if (IsLocal)
- GV.setDSOLocal(true);
- }
+ if (VI && VI.isDSOLocal())
+ GV.setDSOLocal(true);
}
bool DoPromote = false;
OpenPOWER on IntegriCloud