1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/include
JF Bastien 5c6ce4adfa [ADT] restrict bit_cast to trivially-constructible To
Summary: As discussed in r341853 by blaikie, the reinterpret_cast was technically an aliasing violation. Restrict our bit_cast implementation to To which are trivially-constructible (and note the existing restriction to constexpr). Once we move to C++17 we can use a version of bit_cast without these restrictions, or if we care we can SFINAE a different implementation when To isn't trivially-constructible.

Originally landed in r342710 and reverted in r342711 because is_trivially_copyable is only in GCC 5.1 and later.

Reviewers: dblaikie, rsmith

Subscribers: dexonsmith, kristina, llvm-commits

Differential Revision: https://reviews.llvm.org/D52332

llvm-svn: 342739
2018-09-21 14:31:25 +00:00
..
llvm [ADT] restrict bit_cast to trivially-constructible To 2018-09-21 14:31:25 +00:00
llvm-c [LLVM-C][OCaml] Add UnifyFunctionExitNodes pass to C and OCaml APIs 2018-09-18 13:36:03 +00:00