Global label not handled correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31883 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Laskey 2006-11-20 20:29:06 +00:00
parent bdc571b7d5
commit 0374248e86

View File

@ -334,9 +334,17 @@ void AsmPrinter::EmitXXStructorList(Constant *List) {
/// generate the appropriate value.
const std::string AsmPrinter::getGlobalLinkName(const GlobalVariable *GV) const{
std::string LinkName;
// Default action is to use a global symbol.
LinkName = TAI->getGlobalPrefix();
LinkName += GV->getName();
if (isa<Function>(GV)) {
LinkName += TAI->getFunctionAddrPrefix();
LinkName += Mang->getValueName(GV);
LinkName += TAI->getFunctionAddrSuffix();
} else {
LinkName += TAI->getGlobalVarAddrPrefix();
LinkName += Mang->getValueName(GV);
LinkName += TAI->getGlobalVarAddrSuffix();
}
return LinkName;
}