r311576 - Headers: explicitly specify double-word alignment

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 23 09:57:55 PDT 2017


Author: compnerd
Date: Wed Aug 23 09:57:55 2017
New Revision: 311576

URL: http://llvm.org/viewvc/llvm-project?rev=311576&view=rev
Log:
Headers: explicitly specify double-word alignment

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.

Modified:
    cfe/trunk/lib/Headers/unwind.h

Modified: cfe/trunk/lib/Headers/unwind.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/unwind.h?rev=311576&r1=311575&r2=311576&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/unwind.h (original)
+++ cfe/trunk/lib/Headers/unwind.h Wed Aug 23 09:57:55 2017
@@ -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;




More information about the cfe-commits mailing list