summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter.cpp
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2006-10-17 13:41:07 +0000
committerJim Laskey <jlaskey@mac.com>2006-10-17 13:41:07 +0000
commit7126254a0e1cb8eefa6c25498347481cbfa6b2fd (patch)
treef0f92402919e1aa16c4e48c184417e12b5b8afc6 /llvm/lib/CodeGen/AsmPrinter.cpp
parent418c8e69bb20311c9e594c31e8d05e4dccddb758 (diff)
downloadbcm5719-llvm-7126254a0e1cb8eefa6c25498347481cbfa6b2fd.tar.gz
bcm5719-llvm-7126254a0e1cb8eefa6c25498347481cbfa6b2fd.zip
Basic support for getGlobalLinkName.
llvm-svn: 30997
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp
index 9f5447fa5fd..e9542fc6c13 100644
--- a/llvm/lib/CodeGen/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter.cpp
@@ -349,6 +349,16 @@ unsigned AsmPrinter::getPreferredAlignmentLog(const GlobalVariable *GV) const {
return Alignment;
}
+/// getGlobalLinkName - Returns the asm/link name of of the specified
+/// global variable. Should be overridden by each target asm printer to
+/// generate the appropriate value.
+void AsmPrinter::getGlobalLinkName(const GlobalVariable *GV,
+ std::string &LinkName) {
+ // Default action is to use a global symbol.
+ LinkName = TAI->getGlobalPrefix();
+ LinkName += GV->getName();
+}
+
// EmitAlignment - Emit an alignment directive to the specified power of two.
void AsmPrinter::EmitAlignment(unsigned NumBits, const GlobalValue *GV) const {
if (GV && GV->getAlignment())
OpenPOWER on IntegriCloud