commit | 42f63a9ef4a41690ce523189ce5436f98d947715 | [log] [tgz] |
---|---|---|
author | Serge Guelton <sguelton@redhat.com> | Wed Feb 13 09:31:22 2019 +0000 |
committer | Serge Guelton <sguelton@redhat.com> | Wed Feb 13 09:31:22 2019 +0000 |
tree | d962ba5feb37ab5cb765bd773355e8d3045fe48f | |
parent | 95decc39b55517684c798b4ba4ce1e4142a25306 [diff] |
Make llvm::Optional<T> trivially copyable when T is trivially copyable This is an ever-recurring issue (see https://bugs.llvm.org/show_bug.cgi?id=39427 and https://bugs.llvm.org/show_bug.cgi?id=35978) but I believe that thanks to https://reviews.llvm.org/D54472 we can now ship a decent implementation of this. Basically the fact that llvm::is_trivially_copyable has a consistent behavior across compilers should prevent any ABI issue, and using in-place new instead of memcpy should keep compiler bugs away. Differential Revision: https://reviews.llvm.org/D57097 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353927 91177308-0d34-0410-b5e6-96231b3b80d8