aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2012-02-16 04:19:15 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2012-02-16 04:19:15 +0000
commitc8782a1a53aaef6efc710aa33dd21cce1c8033df (patch)
treeaf446369a98ec9ff88658882112db855535a286f
parent1834df8384354217c59e1c5dd8bc091c11b8ca43 (diff)
downloadexternal_llvm-c8782a1a53aaef6efc710aa33dd21cce1c8033df.zip
external_llvm-c8782a1a53aaef6efc710aa33dd21cce1c8033df.tar.gz
external_llvm-c8782a1a53aaef6efc710aa33dd21cce1c8033df.tar.bz2
VMCore/AsmWriter.cpp: Use APFloat instead of atof(3).
atof(3) might behave differently among platforms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150661 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/AsmWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index 7bec783..21d4566 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/lib/VMCore/AsmWriter.cpp
@@ -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;
}