[PATCH] D31074: Fix constant folding of fp2int to large integers
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 17 11:04:28 PDT 2017
efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.
LGTM.
> What do people think of making the APFloat::convertToInteger(uint64_t*) version non-public to avoid this issue in future?
If you want to make the API a bit safer, you can make it take a MutableArrayRef rather than a raw pointer, and assert if the array is too small. (Same applies to other APInt/APFloat APIs.)
Repository:
rL LLVM
https://reviews.llvm.org/D31074
More information about the llvm-commits
mailing list