mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
[ArrayRefTest] Work around a GCC 4.8 internal compiler error.
llvm-svn: 244023
This commit is contained in:
parent
99b0393ce0
commit
214753cf47
@ -46,21 +46,18 @@ TEST(ArrayRefTest, AllocatorCopy) {
|
||||
EXPECT_TRUE(Array2.equals(Array2c));
|
||||
EXPECT_NE(Array2.data(), Array2c.data());
|
||||
|
||||
#if __GNUC__==4 && __GNUC_MINOR__==8
|
||||
// g++-4.8 cannot compile the block below.
|
||||
#else
|
||||
// Check that copy can cope with uninitialized memory.
|
||||
struct NonAssignable {
|
||||
const char *Ptr;
|
||||
|
||||
NonAssignable(const char *Ptr) : Ptr(Ptr) {}
|
||||
NonAssignable(const NonAssignable &RHS) = default;
|
||||
void operator=(const NonAssignable &RHS) { assert(RHS.Ptr != nullptr); }
|
||||
bool operator==(const NonAssignable &RHS) const { return Ptr == RHS.Ptr; }
|
||||
} Array3Src[] = {{"hello"}, {"world"}};
|
||||
} Array3Src[] = {"hello", "world"};
|
||||
ArrayRef<NonAssignable> Array3Copy = makeArrayRef(Array3Src).copy(Alloc);
|
||||
EXPECT_EQ(makeArrayRef(Array3Src), Array3Copy);
|
||||
EXPECT_NE(makeArrayRef(Array3Src).data(), Array3Copy.data());
|
||||
#endif
|
||||
}
|
||||
|
||||
TEST(ArrayRefTest, DropBack) {
|
||||
|
Loading…
Reference in New Issue
Block a user