Clean up interface to getGlobalLinkName.
[oota-llvm.git] / lib / CodeGen / AsmPrinter.cpp
index e9542fc6c1381ed8a1edb4c065c55690d25db29c..90d77adfb3ef2e51873bcf8deef700e220a1c397 100644 (file)
@@ -352,11 +352,12 @@ unsigned AsmPrinter::getPreferredAlignmentLog(const GlobalVariable *GV) const {
 /// 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) {
+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();
+  return LinkName;
 }
 
 // EmitAlignment - Emit an alignment directive to the specified power of two.