aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
diff options
context:
space:
mode:
authorJF Bastien <jfbastien@apple.com>2018-09-21 05:18:49 +0000
committerJF Bastien <jfbastien@apple.com>2018-09-21 05:18:49 +0000
commit86f732a6a8809799a5e1bbae5911c7c48477cadc (patch)
tree3a73977c789b2430d9335aa7401e3116dec0ca7a /llvm/lib/Bitcode/Reader/MetadataLoader.cpp
parent73d8e4e53186c43e7aa99cc0dfa8d640b047ef98 (diff)
downloadllvm-86f732a6a8809799a5e1bbae5911c7c48477cadc.zip
llvm-86f732a6a8809799a5e1bbae5911c7c48477cadc.tar.gz
llvm-86f732a6a8809799a5e1bbae5911c7c48477cadc.tar.bz2
[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. Reviewers: dblaikie, rsmith Subscribers: dexonsmith, kristina, llvm-commits Differential Revision: https://reviews.llvm.org/D52332 llvm-svn: 342710
Diffstat (limited to 'llvm/lib/Bitcode/Reader/MetadataLoader.cpp')
0 files changed, 0 insertions, 0 deletions