1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

Global label not handled correctly.

llvm-svn: 31883
This commit is contained in:
Jim Laskey 2006-11-20 20:29:06 +00:00
parent ad5f088196
commit cd74ba8ae1

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;
}