[PATCH] Fix alignment issues in LLVM.

James Y Knight jyknight at google.com
Thu Jun 4 22:57:24 PDT 2015


Adds static_asserts to ensure alignment of concatenated objects is
correct, and fixes them where they are not.

Also changes the definition of AlignOf to use constexpr, except on
MSVC, to avoid enum comparison warnings from GCC.

(There's not too much of this in llvm itself, most of the fun is in
clang).

This seems to make LLVM actually work without Bus Error on 32bit
sparc.

http://reviews.llvm.org/D10271

Files:
  include/llvm/IR/DerivedTypes.h
  include/llvm/Support/AlignOf.h
  lib/IR/AttributeImpl.h
  lib/IR/Metadata.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10271.27178.patch
Type: text/x-patch
Size: 4962 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150605/872ace3f/attachment.bin>


More information about the llvm-commits mailing list