Recommit Optional specialization for trivially copyable types

Unfortunately the original code gets misscompiled by GCC (at least 8.1),
this is a tentative workaround using std::memcpy instead of inplace new
for trivially copyable types. I'll revert if it breaks.

Original revision: https://reviews.llvm.org/D57097


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354051 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed