From: Chandler Carruth Date: Sat, 16 Jun 2012 09:44:00 +0000 (+0000) Subject: Relax one assertion -- long double has strange alignments on lots of X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=fd2b40efd7687621a7c849556a089ce4a610aafd;p=oota-llvm.git Relax one assertion -- long double has strange alignments on lots of platforms. Also, remove one assertion on MSVC because it produces a completely preposterous result, claiming something needs 12-byte alignment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158599 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/Support/AlignOfTest.cpp b/unittests/Support/AlignOfTest.cpp index c413451f904..461b1d67e06 100644 --- a/unittests/Support/AlignOfTest.cpp +++ b/unittests/Support/AlignOfTest.cpp @@ -139,7 +139,7 @@ TEST(AlignOfTest, BasicAlignmentInvariants) { EXPECT_LE(alignOf(), alignOf()); EXPECT_LE(alignOf(), alignOf()); EXPECT_LE(alignOf(), alignOf()); - EXPECT_LE(alignOf(), alignOf()); + EXPECT_LE(alignOf(), alignOf()); EXPECT_LE(alignOf(), alignOf()); EXPECT_EQ(alignOf(), alignOf()); EXPECT_LE(alignOf(), alignOf()); @@ -246,7 +246,12 @@ TEST(AlignOfTest, BasicAlignedArray) { EXPECT_EQ(alignOf(), alignOf::union_type>()); EXPECT_EQ(alignOf(), alignOf::union_type>()); EXPECT_EQ(alignOf(), alignOf::union_type>()); + + // Some versions of MSVC get this wrong somewhat disturbingly. The failure + // appears to be benign: alignOf() produces a preposterous value: 12 +#ifndef _MSC_VER EXPECT_EQ(alignOf(), alignOf::union_type>()); +#endif } }