From 1724c3481d8237ecb5ef23bf8da04af670d425ff Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Thu, 20 Sep 2018 10:02:06 +0000 Subject: [PATCH] [ADT] Try again to use the same version of llvm::Optional on all compilers The miscompile doesn't reproduce for me anymore with GCC 7.3. I'll watch the buildbots closely. Having different versions of Optional is an ABI violation when linking GCC- and clang-built code together. llvm-svn: 342637 --- llvm/include/llvm/ADT/Optional.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/llvm/include/llvm/ADT/Optional.h b/llvm/include/llvm/ADT/Optional.h index 353e5d0..9242a0a 100644 --- a/llvm/include/llvm/ADT/Optional.h +++ b/llvm/include/llvm/ADT/Optional.h @@ -108,7 +108,6 @@ template struct OptionalStorage { } }; -#if !defined(__GNUC__) || defined(__clang__) // GCC up to GCC7 miscompiles this. /// Storage for trivially copyable types only. template struct OptionalStorage { AlignedCharArrayUnion storage; @@ -125,7 +124,6 @@ template struct OptionalStorage { void reset() { hasVal = false; } }; -#endif } // namespace optional_detail template class Optional { -- 2.7.4