Index: llvm/trunk/include/llvm/ADT/Optional.h =================================================================== --- llvm/trunk/include/llvm/ADT/Optional.h +++ llvm/trunk/include/llvm/ADT/Optional.h @@ -108,24 +108,6 @@ } }; -#if !defined(__GNUC__) || defined(__clang__) // GCC up to GCC7 miscompiles this. -/// Storage for trivially copyable types only. -template struct OptionalStorage { - AlignedCharArrayUnion storage; - bool hasVal = false; - - OptionalStorage() = default; - - OptionalStorage(const T &y) : hasVal(true) { new (storage.buffer) T(y); } - OptionalStorage &operator=(const T &y) { - *reinterpret_cast(storage.buffer) = y; - hasVal = true; - return *this; - } - - void reset() { hasVal = false; } -}; -#endif } // namespace optional_detail template class Optional {