commit | 4cebe6f1f01a34546b3b843b5267619a61bd7d39 | [log] [tgz] |
---|---|---|
author | Louis Dionne <ldionne@apple.com> | Wed Sep 04 12:48:32 2019 +0000 |
committer | android-build-team Robot <android-build-team-robot@google.com> | Fri Sep 20 02:55:53 2019 +0000 |
tree | 6c209731be4af124baae2f8394bc65d2f9351e41 | |
parent | ac104f5121944a74aa012b04a3c3085e5ecc8bbf [diff] |
[libc++] Add `__truncating_cast` for safely casting float types to integers This is needed anytime we need to clamp an arbitrary floating point value to an integer type. Thanks to Eric Fiselier for the patch. Differential Revision: https://reviews.llvm.org/D66836 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@370891 91177308-0d34-0410-b5e6-96231b3b80d8 (cherry picked from commit c9ac8d533010d8915bcfdecab891fb451f71ce74) (cherry picked from commit 4561f55204960c0b3bc4594089ddcf56e5655cad) Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=994957 Bug: http://b/139690488 Change-Id: I300b6565137b51bb3051bb629ec3316edf7f71e9 (cherry picked from commit 34d1dd71fa4c096107dde636e5c723c32a20d387)