diff options
| author | Jim Laskey <jlaskey@mac.com> | 2006-11-20 20:29:06 +0000 |
|---|---|---|
| committer | Jim Laskey <jlaskey@mac.com> | 2006-11-20 20:29:06 +0000 |
| commit | d7f53cdaecdc931c623104bd01ec31a2b8a13dc4 (patch) | |
| tree | b695f1e027aa37d507b35cc26eae79bcf1d9dee6 /llvm/lib/CodeGen | |
| parent | ac36360348b5ae3158f3ad1b31d306bf6d280cf4 (diff) | |
| download | bcm5719-llvm-d7f53cdaecdc931c623104bd01ec31a2b8a13dc4.tar.gz bcm5719-llvm-d7f53cdaecdc931c623104bd01ec31a2b8a13dc4.zip | |
Global label not handled correctly.
llvm-svn: 31883
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp index 9454fe5beb1..c2f5d7334c9 100644 --- a/llvm/lib/CodeGen/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter.cpp @@ -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; } |

