mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
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
This commit is contained in:
parent
1834df8384
commit
c8782a1a53
@ -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
Block a user