diff options
author | Chris Lattner <sabre@nondot.org> | 2008-08-18 19:41:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-08-18 19:41:26 +0000 |
commit | 30fc0583b3ed596eb408772ed17bff2469042f8c (patch) | |
tree | e6b2617a03f022a9e988ccd0b96dcd64e4a0e6cb /llvm/lib/VMCore/AsmWriter.cpp | |
parent | 5abf546865e07114a7d2c8527053b64f3a49608c (diff) | |
download | bcm5719-llvm-30fc0583b3ed596eb408772ed17bff2469042f8c.tar.gz bcm5719-llvm-30fc0583b3ed596eb408772ed17bff2469042f8c.zip |
Fix a bug daniel pointed out to me, where asmprinter started
printing ascii code for hex numbers instead of the hex numbers
themselves.
llvm-svn: 54936
Diffstat (limited to 'llvm/lib/VMCore/AsmWriter.cpp')
-rw-r--r-- | llvm/lib/VMCore/AsmWriter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index f16ae08ef1f..93b69b913e9 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/lib/VMCore/AsmWriter.cpp @@ -252,17 +252,17 @@ static void PrintLLVMName(std::ostream &OS, const ValueName *Name, } else if (isprint(C)) { OS << C; } else { - OS << "\\"; + OS << '\\'; char hex1 = (C >> 4) & 0x0F; if (hex1 < 10) - OS << (hex1 + '0'); + OS << (char)(hex1 + '0'); else - OS << (hex1 - 10 + 'A'); + OS << (char)(hex1 - 10 + 'A'); char hex2 = C & 0x0F; if (hex2 < 10) - OS << (hex2 + '0'); + OS << (char)(hex2 + '0'); else - OS << (hex2 - 10 + 'A'); + OS << (char)(hex2 - 10 + 'A'); } } OS << '"'; |