diff options
| author | Hans Wennborg <hans@hanshq.net> | 2019-02-15 12:20:33 +0000 |
|---|---|---|
| committer | Hans Wennborg <hans@hanshq.net> | 2019-02-15 12:20:33 +0000 |
| commit | cc980bfa8e3179fe27870d1a1a404f118e544ba7 (patch) | |
| tree | af13b57d293ab91a22a5168179f05ef3840e2383 /llvm/unittests | |
| parent | 4f85014dffda33e22edce359eaaa4b162804326a (diff) | |
| download | bcm5719-llvm-cc980bfa8e3179fe27870d1a1a404f118e544ba7.tar.gz bcm5719-llvm-cc980bfa8e3179fe27870d1a1a404f118e544ba7.zip | |
Speculatively revert r354051 "Recommit Optional specialization for trivially copyable types"
and
r354055 "Optional specialization for trivially copyable types, part2"
These are suspected to cause Clang to get miscompiled on Ubuntu 14.04
(Trusty) which uses GCC 4.8.4. Reverting for an hour to see if this
helps. See llvm-commits thread.
> Recommit Optional specialization for trivially copyable types
>
> Unfortunately the original code gets misscompiled by GCC (at least 8.1),
> this is a tentative workaround using std::memcpy instead of inplace new
> for trivially copyable types. I'll revert if it breaks.
>
> Original revision: https://reviews.llvm.org/D57097
llvm-svn: 354126
Diffstat (limited to 'llvm/unittests')
| -rw-r--r-- | llvm/unittests/ADT/OptionalTest.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/llvm/unittests/ADT/OptionalTest.cpp b/llvm/unittests/ADT/OptionalTest.cpp index c39b6727cd5..98adaccca96 100644 --- a/llvm/unittests/ADT/OptionalTest.cpp +++ b/llvm/unittests/ADT/OptionalTest.cpp @@ -18,12 +18,6 @@ using namespace llvm; namespace { -static_assert(llvm::is_trivially_copyable<Optional<int>>::value, - "trivially copyable"); - -static_assert(llvm::is_trivially_copyable<Optional<std::array<int, 3>>>::value, - "trivially copyable"); - struct NonDefaultConstructible { static unsigned CopyConstructions; static unsigned Destructions; @@ -51,10 +45,6 @@ unsigned NonDefaultConstructible::CopyConstructions = 0; unsigned NonDefaultConstructible::Destructions = 0; unsigned NonDefaultConstructible::CopyAssignments = 0; -static_assert( - !llvm::is_trivially_copyable<Optional<NonDefaultConstructible>>::value, - "not trivially copyable"); - // Test fixture class OptionalTest : public testing::Test { }; @@ -213,10 +203,6 @@ struct MultiArgConstructor { }; unsigned MultiArgConstructor::Destructions = 0; -static_assert( - !llvm::is_trivially_copyable<Optional<MultiArgConstructor>>::value, - "not trivially copyable"); - TEST_F(OptionalTest, Emplace) { MultiArgConstructor::ResetCounts(); Optional<MultiArgConstructor> A; @@ -264,9 +250,6 @@ unsigned MoveOnly::MoveConstructions = 0; unsigned MoveOnly::Destructions = 0; unsigned MoveOnly::MoveAssignments = 0; -static_assert(!llvm::is_trivially_copyable<Optional<MoveOnly>>::value, - "not trivially copyable"); - TEST_F(OptionalTest, MoveOnlyNull) { MoveOnly::ResetCounts(); Optional<MoveOnly> O; @@ -368,9 +351,6 @@ private: unsigned Immovable::Constructions = 0; unsigned Immovable::Destructions = 0; -static_assert(!llvm::is_trivially_copyable<Optional<Immovable>>::value, - "not trivially copyable"); - TEST_F(OptionalTest, ImmovableEmplace) { Optional<Immovable> A; Immovable::ResetCounts(); |

