From c6a1346d7c6bb761f9e6c2c85b53febba1cb15db Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 10 Nov 2008 04:30:26 +0000 Subject: Use utohex_buffer instead of utohexstr to avoid creating a temporary string in the .ll and .s printers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58962 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp') diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 0185441509..a9b297375f 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/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(Value)); + char Buffer[20]; + + O << "0x" << utohex_buffer(static_cast(Value), Buffer+20); } /// EOL - Print a newline character to asm stream. If a comment is present -- cgit v1.2.3-18-g5258