mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-23 20:45:06 +00:00
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:
parent
b60c02e005
commit
1a92d941b3
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user