diff options
Diffstat (limited to 'llvm/lib/Transforms/Utils')
| -rw-r--r-- | llvm/lib/Transforms/Utils/FunctionImportUtils.cpp | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp b/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp index 5b68efbb6d8..dc9859156c4 100644 --- a/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp +++ b/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp @@ -238,7 +238,7 @@ void FunctionImportGlobalProcessing::processGlobalForThinLTO(GlobalValue &GV) {    // If global value dead stripping is not enabled in summary then    // propagateConstants hasn't been run. We can't internalize GV    // in such case. -  if (!GV.isDeclaration() && VI && ImportIndex.withGlobalValueDeadStripping()) { +  if (!GV.isDeclaration() && VI && ImportIndex.withAttributePropagation()) {      if (GlobalVariable *V = dyn_cast<GlobalVariable>(&GV)) {        // We can have more than one local with the same GUID, in the case of        // same-named locals in different but same-named source files that were @@ -252,7 +252,7 @@ void FunctionImportGlobalProcessing::processGlobalForThinLTO(GlobalValue &GV) {        auto* GVS = dyn_cast_or_null<GlobalVarSummary>(            ImportIndex.findSummaryInModule(VI, M.getModuleIdentifier()));        // At this stage "maybe" is "definitely" -      if (GVS && (GVS->maybeReadOnly() || GVS->maybeWriteOnly())) +      if (GVS && (ImportIndex.isReadOnly(GVS) || ImportIndex.isWriteOnly(GVS)))          V->addAttribute("thinlto-internalize");      }    }  | 

