blob: 1a3ca5a9230494756f8f9406a7e45fd453594495 [file] [log] [blame]
Eric Fiselier9ac4c9c2016-07-20 23:56:42 +00001// -*- 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 Abdulrasool93166ad2017-08-23 16:50:27 +000016// EHABI : 8-byte aligned
17// itanium: largest supported alignment for the system
18#if defined(_LIBUNWIND_ARM_EHABI)
19static_assert(alignof(_Unwind_Control_Block) == 8,
20 "_Unwind_Control_Block must be double-word aligned");
21#else
22struct MaxAligned {} __attribute__((__aligned__));
23static_assert(alignof(_Unwind_Exception) == alignof(MaxAligned),
24 "_Unwind_Exception must be maximally aligned");
25#endif
Eric Fiselier9ac4c9c2016-07-20 23:56:42 +000026
27int main()
28{
29}