VMCore/AsmWriter.cpp: Use APFloat instead of atof(3).
atof(3) might behave differently among platforms. llvm-svn: 150661
This commit is contained in:
parent
5b44688d6b
commit
aec412337c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue