From 360f661733245ec15be4fc10c413f683c3cdd13f Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Thu, 14 Nov 2019 16:07:13 +0100 Subject: Revert "[ThinLTO] Add correctness check for RO/WO variable import" This reverts commit a2292cc537b561416c21e8d4017715d652c144cc. Breaks clang selfhost w/ThinLTO. --- llvm/lib/Transforms/Utils/FunctionImportUtils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Transforms/Utils') diff --git a/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp b/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp index d795a0a2070..401be682043 100644 --- a/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp +++ b/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp @@ -250,12 +250,12 @@ void FunctionImportGlobalProcessing::processGlobalForThinLTO(GlobalValue &GV) { // contains summaries from the source modules if they are being imported. // We might have a non-null VI and get here even in that case if the name // matches one in this module (e.g. weak or appending linkage). - auto *GVS = dyn_cast_or_null( - ImportIndex.findSummaryInModule(VI, M.getModuleIdentifier())); + auto* GVS = dyn_cast_or_null( + ImportIndex.findSummaryInModule(VI, M.getModuleIdentifier())); if (GVS && (ImportIndex.isReadOnly(GVS) || ImportIndex.isWriteOnly(GVS))) { V->addAttribute("thinlto-internalize"); - // Objects referenced by writeonly GV initializer should not be + // Objects referenced by writeonly GV initializer should not be // promoted, because there is no any kind of read access to them // on behalf of this writeonly GV. To avoid promotion we convert // GV initializer to 'zeroinitializer'. This effectively drops -- cgit v1.2.3