[llvm-commits] [llvm] r150661 - /llvm/trunk/lib/VMCore/AsmWriter.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Wed Feb 15 20:19:15 PST 2012
Author: chapuni
Date: Wed Feb 15 22:19:15 2012
New Revision: 150661
URL: http://llvm.org/viewvc/llvm-project?rev=150661&view=rev
Log:
VMCore/AsmWriter.cpp: Use APFloat instead of atof(3).
atof(3) might behave differently among platforms.
Modified:
llvm/trunk/lib/VMCore/AsmWriter.cpp
Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=150661&r1=150660&r2=150661&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Wed Feb 15 22:19:15 2012
@@ -733,7 +733,7 @@
((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;
}
More information about the llvm-commits
mailing list