summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/Analysis.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/Analysis.cpp b/llvm/lib/CodeGen/Analysis.cpp
index 75579a2b455..97b692fbe56 100644
--- a/llvm/lib/CodeGen/Analysis.cpp
+++ b/llvm/lib/CodeGen/Analysis.cpp
@@ -639,6 +639,11 @@ bool llvm::canBeOmittedFromSymbolTable(const GlobalValue *GV) {
if (isa<GlobalAlias>(GV))
return false;
+ // If we don't see every use, we have to be conservative and assume the value
+ // address is significant.
+ if (GV->getParent()->getMaterializer())
+ return false;
+
GlobalStatus GS;
if (GlobalStatus::analyzeGlobal(GV, GS))
return false;
OpenPOWER on IntegriCloud