aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp')
-rw-r--r--lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp b/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
index 572326e76d..7a16684959 100644
--- a/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
+++ b/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp
@@ -303,11 +303,12 @@ void SystemZAsmPrinter::printRRIAddrOperand(const MachineInstr *MI, int OpNum,
/// PrintUnmangledNameSafely - Print out the printable characters in the name.
/// Don't print things like \\n or \\0.
-static void PrintUnmangledNameSafely(const Value *V, formatted_raw_ostream &OS) {
- for (const char *Name = V->getNameStart(), *E = Name+V->getNameLen();
- Name != E; ++Name)
- if (isprint(*Name))
- OS << *Name;
+static void PrintUnmangledNameSafely(const Value *V,
+ formatted_raw_ostream &OS) {
+ for (StringRef::iterator it = V->getName().begin(),
+ ie = V->getName().end(); it != ie; ++it)
+ if (isprint(*it))
+ OS << *it;
}
void SystemZAsmPrinter::PrintGlobalVariable(const GlobalVariable* GVar) {