diff options
author | Chris Lattner <sabre@nondot.org> | 2008-02-15 19:04:54 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-02-15 19:04:54 +0000 |
commit | ec321b4d64ee02a1b90021c09d9513618787c6e8 (patch) | |
tree | fb4d896b2649dd36400c4aff0a713f47dd6d49d2 /lib/Target/X86/X86AsmPrinter.cpp | |
parent | 3502d0dac35531279ca848d2aaaa290f11172d6d (diff) |
Handle \n's in value names for more targets. The asm printers
really really really need refactoring :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86AsmPrinter.cpp')
-rw-r--r-- | lib/Target/X86/X86AsmPrinter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp index e23dd0d587..9720100e37 100644 --- a/lib/Target/X86/X86AsmPrinter.cpp +++ b/lib/Target/X86/X86AsmPrinter.cpp @@ -138,9 +138,9 @@ bool X86SharedAsmPrinter::doInitialization(Module &M) { return Result; } -/// PrintUnamedNameSafely - Print out the printable characters in the name. +/// PrintUnmangledNameSafely - Print out the printable characters in the name. /// Don't print things like \n or \0. -static void PrintUnamedNameSafely(const Value *V, std::ostream &OS) { +static void PrintUnmangledNameSafely(const Value *V, std::ostream &OS) { for (const char *Name = V->getNameStart(), *E = Name+V->getNameLen(); Name != E; ++Name) if (isprint(*Name)) @@ -228,7 +228,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) { O << "," << (TAI->getAlignmentIsInBytes() ? (1 << Align) : Align); } O << "\t\t" << TAI->getCommentString() << " "; - PrintUnamedNameSafely(I, O); + PrintUnmangledNameSafely(I, O); O << "\n"; continue; } @@ -331,7 +331,7 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) { EmitAlignment(Align, I); O << name << ":\t\t\t\t" << TAI->getCommentString() << " "; - PrintUnamedNameSafely(I, O); + PrintUnmangledNameSafely(I, O); O << "\n"; if (TAI->hasDotTypeDotSizeDirective()) O << "\t.size\t" << name << ", " << Size << "\n"; |