[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp DwarfWriter.cpp

Jim Laskey jlaskey at apple.com
Tue Oct 17 10:17:43 PDT 2006



Changes in directory llvm/lib/CodeGen:

AsmPrinter.cpp updated: 1.110 -> 1.111
DwarfWriter.cpp updated: 1.81 -> 1.82
---
Log message:

Clean up interface to getGlobalLinkName.

---
Diffs of the changes:  (+4 -4)

 AsmPrinter.cpp  |    5 +++--
 DwarfWriter.cpp |    3 +--
 2 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/lib/CodeGen/AsmPrinter.cpp
diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.110 llvm/lib/CodeGen/AsmPrinter.cpp:1.111
--- llvm/lib/CodeGen/AsmPrinter.cpp:1.110	Tue Oct 17 08:41:07 2006
+++ llvm/lib/CodeGen/AsmPrinter.cpp	Tue Oct 17 12:17:24 2006
@@ -352,11 +352,12 @@
 /// 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.


Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.81 llvm/lib/CodeGen/DwarfWriter.cpp:1.82
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.81	Tue Oct 17 08:41:07 2006
+++ llvm/lib/CodeGen/DwarfWriter.cpp	Tue Oct 17 12:17:24 2006
@@ -1634,8 +1634,7 @@
   AddSourceLine(VariableDie, UnitDesc, GVD->getLine());
   
   // Work up linkage name.
-  std::string LinkageName;
-  Asm->getGlobalLinkName(GV, LinkageName);
+  const std::string LinkageName = Asm->getGlobalLinkName(GV);
 
   // Add address.
   DIEBlock *Block = new DIEBlock();






More information about the llvm-commits mailing list