VMCore/AsmWriter.cpp: Use APFloat instead of atof(3).

atof(3) might behave differently among platforms.

llvm-svn: 150661
This commit is contained in:
NAKAMURA Takumi 2012-02-16 04:19:15 +00:00
parent 5b44688d6b
commit aec412337c
1 changed files with 1 additions and 1 deletions

View File

@ -733,7 +733,7 @@ static void WriteConstantInternal(raw_ostream &Out, const Constant *CV,
((StrVal[0] == '-' || StrVal[0] == '+') &&
(StrVal[1] >= '0' && StrVal[1] <= '9'))) {
// Reparse stringized version!
if (atof(StrVal.c_str()) == Val) {
if (APFloat(APFloat::IEEEdouble, StrVal).convertToDouble() == Val) {
Out << StrVal.str();
return;
}