summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/LTO/LTOCodeGenerator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp
index b4a70119cc2..16718d7ce64 100644
--- a/llvm/lib/LTO/LTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/LTOCodeGenerator.cpp
@@ -82,6 +82,7 @@ void LTOCodeGenerator::initialize() {
DiagHandler = nullptr;
DiagContext = nullptr;
OwnedModule = nullptr;
+ ShouldInternalize = true;
initializeLTOPasses();
}
@@ -464,7 +465,7 @@ static void accumulateAndSortLibcalls(std::vector<StringRef> &Libcalls,
}
void LTOCodeGenerator::applyScopeRestrictions() {
- if (ScopeRestrictionsDone)
+ if (ScopeRestrictionsDone || !ShouldInternalize)
return;
Module *mergedModule = IRLinker.getModule();
OpenPOWER on IntegriCloud