From 2c3e0051c31c3f5b2328b447eadf1cf9c4427442 Mon Sep 17 00:00:00 2001 From: Pirama Arumuga Nainar Date: Wed, 6 May 2015 11:46:36 -0700 Subject: Update aosp/master LLVM for rebase to r235153 Change-Id: I9bf53792f9fc30570e81a8d80d296c681d005ea7 (cherry picked from commit 0c7f116bb6950ef819323d855415b2f2b0aad987) --- unittests/Support/AlignOfTest.cpp | 42 ++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 23 deletions(-) (limited to 'unittests/Support/AlignOfTest.cpp') diff --git a/unittests/Support/AlignOfTest.cpp b/unittests/Support/AlignOfTest.cpp index d209086..e0859fc 100644 --- a/unittests/Support/AlignOfTest.cpp +++ b/unittests/Support/AlignOfTest.cpp @@ -39,24 +39,10 @@ namespace { #endif // Define some fixed alignment types to use in these tests. -#if __has_feature(cxx_alignas) -struct alignas(1) A1 { }; -struct alignas(2) A2 { }; -struct alignas(4) A4 { }; -struct alignas(8) A8 { }; -#elif defined(__GNUC__) -struct A1 { } __attribute__((aligned(1))); -struct A2 { } __attribute__((aligned(2))); -struct A4 { } __attribute__((aligned(4))); -struct A8 { } __attribute__((aligned(8))); -#elif defined(_MSC_VER) -__declspec(align(1)) struct A1 { }; -__declspec(align(2)) struct A2 { }; -__declspec(align(4)) struct A4 { }; -__declspec(align(8)) struct A8 { }; -#else -# error No supported align as directive. -#endif +struct LLVM_ALIGNAS(1) A1 {}; +struct LLVM_ALIGNAS(2) A2 {}; +struct LLVM_ALIGNAS(4) A4 {}; +struct LLVM_ALIGNAS(8) A8 {}; struct S1 {}; struct S2 { char a; }; @@ -75,12 +61,22 @@ struct D8 : S1, D4, D5 { double x[2]; }; struct D9 : S1, D1 { S1 s1; }; struct V1 { virtual ~V1(); }; struct V2 { int x; virtual ~V2(); }; -struct V3 : V1 { virtual ~V3(); }; -struct V4 : virtual V2 { int y; virtual ~V4(); }; -struct V5 : V4, V3 { double z; virtual ~V5(); }; +struct V3 : V1 { + ~V3() override; +}; +struct V4 : virtual V2 { int y; + ~V4() override; +}; +struct V5 : V4, V3 { double z; + ~V5() override; +}; struct V6 : S1 { virtual ~V6(); }; -struct V7 : virtual V2, virtual V6 { virtual ~V7(); }; -struct V8 : V5, virtual V6, V7 { double zz; virtual ~V8(); }; +struct V7 : virtual V2, virtual V6 { + ~V7() override; +}; +struct V8 : V5, virtual V6, V7 { double zz; + ~V8() override; +}; double S6::f() { return 0.0; } float D2::g() { return 0.0f; } -- cgit v1.1