summaryrefslogtreecommitdiffstats
path: root/libunwind/test
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-07-20 23:56:42 +0000
committerEric Fiselier <eric@efcs.ca>2016-07-20 23:56:42 +0000
commit19f802ff68361af0a28c8ad6e12daf9bd740b96d (patch)
treecad3b5e1c754736595117f2717b0f6949104ebf7 /libunwind/test
parentde337b876f6aa366a91ca2a33603555d05f72a38 (diff)
downloadbcm5719-llvm-19f802ff68361af0a28c8ad6e12daf9bd740b96d.tar.gz
bcm5719-llvm-19f802ff68361af0a28c8ad6e12daf9bd740b96d.zip
[libunwind] Properly align _Unwind_Exception.
Summary: _Unwind_Exception is required to be double word aligned. Currently the struct is under aligned. Reviewers: mclow.lists, compnerd, kledzik, emaste Subscribers: emaste, cfe-commits Differential Revision: https://reviews.llvm.org/D22543 llvm-svn: 276215
Diffstat (limited to 'libunwind/test')
-rw-r--r--libunwind/test/alignment.pass.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/libunwind/test/alignment.pass.cpp b/libunwind/test/alignment.pass.cpp
new file mode 100644
index 00000000000..5ab55842621
--- /dev/null
+++ b/libunwind/test/alignment.pass.cpp
@@ -0,0 +1,21 @@
+// -*- C++ -*-
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// The Itanium ABI requires that _Unwind_Exception objects are "double-word
+// aligned".
+
+#include <unwind.h>
+
+struct MaxAligned {} __attribute__((aligned));
+static_assert(alignof(_Unwind_Exception) == alignof(MaxAligned), "");
+
+int main()
+{
+}
OpenPOWER on IntegriCloud