aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLauro Ramos Venancio <lauro.venancio@gmail.com>2007-01-26 19:51:32 +0000
committerLauro Ramos Venancio <lauro.venancio@gmail.com>2007-01-26 19:51:32 +0000
commit1a92d941b3541f0c361caad499d0eb37a8339453 (patch)
treebd3bd01f1dfa72f1724da8668e24256891ff8a06
parentb60c02e0050ab62f0c65a644cd353598d49aac99 (diff)
If the constant pool value is a extern weak symbol, emit the weak reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33543 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/ARMAsmPrinter.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp
index c1946ded14..de12dfa7c9 100644
--- a/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -121,7 +121,8 @@ namespace {
printDataDirective(MCPV->getType());
ARMConstantPoolValue *ACPV = (ARMConstantPoolValue*)MCPV;
- std::string Name = Mang->getValueName(ACPV->getGV());
+ GlobalValue *GV = ACPV->getGV();
+ std::string Name = Mang->getValueName(GV);
if (ACPV->isNonLazyPointer()) {
GVNonLazyPtrs.insert(Name);
O << TAI->getPrivateGlobalPrefix() << Name << "$non_lazy_ptr";
@@ -132,6 +133,11 @@ namespace {
<< utostr(ACPV->getLabelId())
<< "+" << (unsigned)ACPV->getPCAdjustment() << ")";
O << "\n";
+
+ // If the constant pool value is a extern weak symbol, remember to emit
+ // the weak reference.
+ if (GV->hasExternalWeakLinkage())
+ ExtWeakSymbols.insert(GV);
}
void getAnalysisUsage(AnalysisUsage &AU) const {