OSDN Git Service

[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)
commit884543269e42c41bd1a8785068791b122dfa6e11
tree5b0eaac0820a8a3f4e6a98219edae1f8342b8702
parentb5501c956e5e81206762bc859e786fa03af93658
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322859 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/Optional.h