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
This commit is contained in:
Lauro Ramos Venancio 2007-01-26 19:51:32 +00:00
parent b60c02e005
commit 1a92d941b3

View File

@ -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 {