mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Use utohex_buffer instead of utohexstr to avoid creating a temporary
string in the .ll and .s printers. llvm-svn: 58962
This commit is contained in:
parent
46166d50a8
commit
1185c9a72c
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user