[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
This commit is contained in:
Benjamin Kramer 2018-09-20 10:02:06 +00:00
parent 66db8af3aa
commit 1724c3481d
1 changed files with 0 additions and 2 deletions

View File

@ -108,7 +108,6 @@ template <typename T, bool IsPodLike> struct OptionalStorage {
}
};
#if !defined(__GNUC__) || defined(__clang__) // GCC up to GCC7 miscompiles this.
/// Storage for trivially copyable types only.
template <typename T> struct OptionalStorage<T, true> {
AlignedCharArrayUnion<T> storage;
@ -125,7 +124,6 @@ template <typename T> struct OptionalStorage<T, true> {
void reset() { hasVal = false; }
};
#endif
} // namespace optional_detail
template <typename T> class Optional {