OSDN Git Service

Fix alignment issues in LLVM.
authorJames Y Knight <jyknight@google.com>
Wed, 17 Jun 2015 01:21:20 +0000 (01:21 +0000)
committerJames Y Knight <jyknight@google.com>
Wed, 17 Jun 2015 01:21:20 +0000 (01:21 +0000)
commit4a80b4b0c017c9c13b3c3e806b8f6159addb9bed
treed3da989d14bf863e6e5ab928cc7448c327f4c9e6
parentcc625c9f2573752a35d24894ced8a7220ff734c4
Fix alignment issues in LLVM.

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.

Differential Revision: http://reviews.llvm.org/D10271

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239872 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/DerivedTypes.h
include/llvm/IR/User.h
include/llvm/Support/AlignOf.h
lib/IR/AttributeImpl.h
lib/IR/Metadata.cpp
lib/IR/User.cpp