Eric Fiselier | 9ac4c9c | 2016-07-20 23:56:42 +0000 | [diff] [blame] | 1 | // -*- C++ -*- |
| 2 | //===----------------------------------------------------------------------===// |
| 3 | // |
| 4 | // The LLVM Compiler Infrastructure |
| 5 | // |
| 6 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 7 | // Source Licenses. See LICENSE.TXT for details. |
| 8 | // |
| 9 | //===----------------------------------------------------------------------===// |
| 10 | |
| 11 | // The Itanium ABI requires that _Unwind_Exception objects are "double-word |
| 12 | // aligned". |
| 13 | |
| 14 | #include <unwind.h> |
| 15 | |
Saleem Abdulrasool | 93166ad | 2017-08-23 16:50:27 +0000 | [diff] [blame] | 16 | // EHABI : 8-byte aligned |
| 17 | // itanium: largest supported alignment for the system |
| 18 | #if defined(_LIBUNWIND_ARM_EHABI) |
| 19 | static_assert(alignof(_Unwind_Control_Block) == 8, |
| 20 | "_Unwind_Control_Block must be double-word aligned"); |
| 21 | #else |
| 22 | struct MaxAligned {} __attribute__((__aligned__)); |
| 23 | static_assert(alignof(_Unwind_Exception) == alignof(MaxAligned), |
| 24 | "_Unwind_Exception must be maximally aligned"); |
| 25 | #endif |
Eric Fiselier | 9ac4c9c | 2016-07-20 23:56:42 +0000 | [diff] [blame] | 26 | |
| 27 | int main() |
| 28 | { |
| 29 | } |