[PATCH] Support/APFloat, fix assert on convertFromString(toString(infty))
Duncan P. N. Exon Smith
dexonsmith at apple.com
Tue Mar 17 10:46:30 PDT 2015
> On 2015-Mar-16, at 15:54, Johan Engelen <jbc.engelen at swissonline.ch> wrote:
>
> Hello,
> Here is a patch for /lib/Support/APFloat.cpp that fixes an assert when the output of APFloat::toString() is fed back into APFloat::convertFromString().
>
> For infinity, toString() outputs a string with upper case "Inf", whereas convertFromString() only accepts lowercase "inf".
>
> The patch adds "Inf" and "-Inf" to the accepted strings in convertFromString(), and modifies the output from toString() to "Inf" instead of "+Inf" for positive infinity.
>
> Thanks,
> Johan
Testcase? I suggest something in unittests/ADT/APFloatTest.cpp.
More information about the llvm-commits
mailing list