[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:
parent
66db8af3aa
commit
1724c3481d
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue