aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp4
-rw-r--r--lib/VMCore/AsmWriter.cpp3
2 files changed, 5 insertions, 2 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
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index 34e9716f68..2f6c1cc0f2 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -662,7 +662,8 @@ static void WriteConstantInt(raw_ostream &Out, const Constant *CV,
// output the string in hexadecimal format!
assert(sizeof(double) == sizeof(uint64_t) &&
"assuming that double is 64 bits!");
- Out << "0x" << utohexstr(DoubleToBits(Val));
+ char Buffer[40];
+ Out << "0x" << utohex_buffer(uint64_t(DoubleToBits(Val)), Buffer+40);
return;
}