Johan Engelen
2015-Mar-07 13:58 UTC
[LLVMdev] APFloat: assertion for convertFromString(toString(infty))
Hello all, I've stumbled across a problem where a string generated by APFloat::toString() results in an assertion when passed to APFloat::convertFromString(). The problem is simple: toString() generates "-Inf" and "+Inf" (line 3550 in /lib/Support/APFloat.cpp) convertFromString only recognizes "-inf" and "inf" (line 2617 in /lib/Support/APFloat.cpp) How would you like me to fix this? Expand the set of accepted strings for convertFromString, or modify toString to output "inf" and "-inf"? (In LDC we started using APFloat's convertFromString() and hit upon this problem.) Thanks, Johan