Teach DataLayout that pointer ABI and preferred alignments are required to be powers...
authorOwen Anderson <resistor@mac.com>
Mon, 2 Mar 2015 06:33:51 +0000 (06:33 +0000)
committerOwen Anderson <resistor@mac.com>
Mon, 2 Mar 2015 06:33:51 +0000 (06:33 +0000)
commitddfdffbb10b3702b1a1e685b1c4e7b7808c222cf
tree0101388b15da39df67d6a8a993337de67f0c8c0f
parentf212856e5032c8ee760f6bb67190da01db296535
Teach DataLayout that pointer ABI and preferred alignments are required to be powers of two.

Previously this resulted in asserts and/or crashes (depending on build configuration) at various phases in the optimizer.

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