remove the string form of printVisibility.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93609 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp b/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp
index 87f5aad..ac4776e 100644
--- a/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp
+++ b/lib/Target/PIC16/AsmPrinter/PIC16AsmPrinter.cpp
@@ -128,7 +128,8 @@
   O << "\tretlw  high(" << PAN::getFrameLabel(CurrentFnName) << ")\n";
 
   // Emit function start label.
-  O << CurrentFnName << ":\n";
+  CurrentFnSym->print(O, MAI);
+  O << ":\n";
 
   DebugLoc CurDL;
   O << "\n"; 
@@ -399,7 +400,8 @@
   // Emit the data section name.
   O << "\n"; 
   
-  PIC16Section *fPDataSection = const_cast<PIC16Section *>(getObjFileLowering().
+  PIC16Section *fPDataSection =
+    const_cast<PIC16Section *>(getObjFileLowering().
                                 SectionForFrame(CurrentFnName));
  
   fPDataSection->setColor(getFunctionColor(F)); 
diff --git a/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp b/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
index 86958b9..b546358 100644
--- a/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
+++ b/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
@@ -35,7 +35,6 @@
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/FormattedStream.h"
-#include "llvm/Support/Mangler.h"
 using namespace llvm;
 
 STATISTIC(EmittedInsts, "Number of machine instrs printed");
@@ -184,9 +183,7 @@
     return;
   case MachineOperand::MO_GlobalAddress: {
     const GlobalValue *GV = MO.getGlobal();
-    std::string Name = Mang->getMangledName(GV);
-
-    O << Name;
+    GetGlobalValueSymbol(GV)->print(O, MAI);
 
     // Assemble calls via PLT for externally visible symbols if PIC.
     if (TM.getRelocationModel() == Reloc::PIC_ &&
@@ -250,17 +247,11 @@
 
     printOffset(MO.getOffset());
     break;
-  case MachineOperand::MO_GlobalAddress: {
-    const GlobalValue *GV = MO.getGlobal();
-    std::string Name = Mang->getMangledName(GV);
-
-    O << Name;
+  case MachineOperand::MO_GlobalAddress:
+    GetGlobalValueSymbol(MO.getGlobal())->print(O, MAI);
     break;
-  }
   case MachineOperand::MO_ExternalSymbol: {
-    std::string Name(MAI->getGlobalPrefix());
-    Name += MO.getSymbolName();
-    O << Name;
+    GetExternalSymbolSymbol(MO.getSymbolName())->print(O, MAI);
     break;
   }
   default: