]> granicus.if.org Git - clang/commitdiff
Headers: explicitly specify double-word alignment
authorSaleem Abdulrasool <compnerd@compnerd.org>
Wed, 23 Aug 2017 16:57:55 +0000 (16:57 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Wed, 23 Aug 2017 16:57:55 +0000 (16:57 +0000)
GCC will interpret `__attribute__((__aligned__))` as 8-byte alignment on
ARM, but clang will not.  Explicitly specify the alignment.  This
mirrors the declaration in libunwind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311576 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Headers/unwind.h

index c5ad04863f48cc882fd775aade557b0aba2a12bc..22414a4e46d0ae936b50190e9e6ecb9ea6e13e94 100644 (file)
@@ -149,7 +149,7 @@ struct _Unwind_Control_Block {
     uint32_t reserved1;
   } pr_cache;
   long long int : 0; /* force alignment of next item to 8-byte boundary */
-} __attribute__((__aligned__));
+} __attribute__((__aligned__(8)));
 #else
 struct _Unwind_Exception {
   _Unwind_Exception_Class exception_class;