From b773203fb58f3ef282fb69c832d8710cab5bc82d Mon Sep 17 00:00:00 2001 From: patrick Date: Sun, 27 Jan 2019 16:42:12 +0000 Subject: Import LLVM 7.0.1 release including clang, lld and lldb. --- gnu/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'gnu/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp') diff --git a/gnu/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp b/gnu/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp index 6b5f593073b..479816a339d 100644 --- a/gnu/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp +++ b/gnu/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp @@ -206,15 +206,10 @@ 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 &Summary) { - return Summary->isDSOLocal(); - }); - if (IsLocal) - GV.setDSOLocal(true); + if (VI && VI.isDSOLocal()) { + GV.setDSOLocal(true); + if (GV.hasDLLImportStorageClass()) + GV.setDLLStorageClass(GlobalValue::DefaultStorageClass); } } -- cgit v1.2.3-59-g8ed1b