diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-10 04:30:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-10 04:30:26 +0000 |
commit | 5505eed5ac9a44dd182cc0a3462ae478556c8f59 (patch) | |
tree | 19c0338d434b87e911ca2df40a3cac64e810819f /llvm/lib/CodeGen | |
parent | 90cdddec751093a9dbf41c053eee5678ce683b13 (diff) | |
download | bcm5719-llvm-5505eed5ac9a44dd182cc0a3462ae478556c8f59.tar.gz bcm5719-llvm-5505eed5ac9a44dd182cc0a3462ae478556c8f59.zip |
Use utohex_buffer instead of utohexstr to avoid creating a temporary
string in the .ll and .s printers.
llvm-svn: 58962
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 01854415090..a9b297375f6 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -564,7 +564,9 @@ void AsmPrinter::PrintSLEB128(int Value) const { /// PrintHex - Print a value as a hexidecimal value. /// void AsmPrinter::PrintHex(int Value) const { - O << "0x" << utohexstr(static_cast<unsigned>(Value)); + char Buffer[20]; + + O << "0x" << utohex_buffer(static_cast<unsigned>(Value), Buffer+20); } /// EOL - Print a newline character to asm stream. If a comment is present |