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
This commit is contained in:
Chris Lattner
2008-11-10 04:30:26 +00:00
parent 886645a3c3
commit c6a1346d7c
2 changed files with 5 additions and 2 deletions

View File

@@ -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;
}