[ADT] Add a workaround for GCC miscompiling the trivially copyable Optional
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 18 Jan 2018 15:47:59 +0000 (15:47 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 18 Jan 2018 15:47:59 +0000 (15:47 +0000)
commit6b5c3003279f46aba39e88a1dc88edf7ac7ce9a8
tree27a842bc4b45e0f3d2dd3f48192a1a8e4384ec76
parent5e4df288e2a9a8e9da417ba4488504caa7eaf394
[ADT] Add a workaround for GCC miscompiling the trivially copyable Optional

I've seen random crashes with GCC 4.8, GCC 6.3 and GCC 7.3, triggered by
my Optional change. All of them affect a different set of targets. This
change fixes the instance of the problem I'm seeing on my local machine,
let's hope it's good enough for the other instances too.

llvm-svn: 322859
llvm/include/llvm/ADT/Optional.h