]> granicus.if.org Git - llvm/commit
Fix APFloat from string conversion for Inf
authorSerguei Katkov <serguei.katkov@azul.com>
Thu, 19 Oct 2017 11:16:03 +0000 (11:16 +0000)
committerSerguei Katkov <serguei.katkov@azul.com>
Thu, 19 Oct 2017 11:16:03 +0000 (11:16 +0000)
commit90ee44d185a3e9cafa156ec58901adc73931de16
treebeefffd1da13ce5e88335772eb46cf0d618aeeea
parent24177b8a151a8538682e1ce4d7485ef55b449e11
Fix APFloat from string conversion for Inf

The method IEEEFloat::convertFromStringSpecials() does not recognize
the "+Inf" and "-Inf" strings but these strings are printed for
the double Infinities by the IEEEFloat::toString().

This patch adds the "+Inf" and "-Inf" strings to the list of recognized
patterns in IEEEFloat::convertFromStringSpecials().

Reviewers: sberg, bogner, majnemer, timshen, rnk, skatkov, gottesmm, bkramer, scanon
Reviewed By: skatkov
Subscribers: apilipenko, reames, llvm-commits
Differential Revision: https://reviews.llvm.org/D38030

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316156 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/APFloat.cpp
unittests/ADT/APFloatTest.cpp