Teach DataLayout that alignments on basic types must be powers of two.
authorOwen Anderson <resistor@mac.com>
Mon, 2 Mar 2015 09:35:03 +0000 (09:35 +0000)
committerOwen Anderson <resistor@mac.com>
Mon, 2 Mar 2015 09:35:03 +0000 (09:35 +0000)
commit8fae2845b1aa7c9e83796dfb656f9a74bf846205
treefdc0c2d1e63f6525928d453187596a23065bc868
parentc7292fdabe8fb9d0f08f6e8d811f37c286c64dbb
Teach DataLayout that alignments on basic types must be powers of two.

Fixes assertion failures/crashes on bad datalayout specifications.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230940 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/DataLayout.cpp
test/Assembler/invalid-datalayout23.ll [new file with mode: 0644]
test/Assembler/invalid-datalayout24.ll [new file with mode: 0644]