summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2019-11-14 16:07:13 +0100
committerBenjamin Kramer <benny.kra@googlemail.com>2019-11-14 16:07:13 +0100
commit360f661733245ec15be4fc10c413f683c3cdd13f (patch)
treecb996f56a1c5407b37e712730734db7884490c6a /llvm/lib/Transforms/Utils
parenta0a38b81ea911f1cd4e400f1ab54dd4930598a7c (diff)
downloadbcm5719-llvm-360f661733245ec15be4fc10c413f683c3cdd13f.tar.gz
bcm5719-llvm-360f661733245ec15be4fc10c413f683c3cdd13f.zip
Revert "[ThinLTO] Add correctness check for RO/WO variable import"
This reverts commit a2292cc537b561416c21e8d4017715d652c144cc. Breaks clang selfhost w/ThinLTO.
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r--llvm/lib/Transforms/Utils/FunctionImportUtils.cpp6
1 files changed, 3 insertions, 3 deletions
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<GlobalVarSummary>(
- ImportIndex.findSummaryInModule(VI, M.getModuleIdentifier()));
+ auto* GVS = dyn_cast_or_null<GlobalVarSummary>(
+ 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
OpenPOWER on IntegriCloud