aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-10 04:30:26 +0000
committerChris Lattner <sabre@nondot.org>2008-11-10 04:30:26 +0000
commitc6a1346d7c6bb761f9e6c2c85b53febba1cb15db (patch)
tree6ff26def7afd94a7262402bd084c0152497e3c35 /lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parent886645a3c3a5628b2c062cd486e24b86d82d84d9 (diff)
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
Diffstat (limited to 'lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp4
1 files changed, 3 insertions, 1 deletions
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<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