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)
commit040f2f890e95d777e19cb11f090095c86c8d2034
tree477652b18ebc254c660aa839c0aeae91714d3869
parentd333c36e8a765bc08ec0fb44bafcfa10870818c1
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.

llvm-svn: 230938
llvm/lib/IR/DataLayout.cpp
llvm/test/Assembler/invalid-datalayout20.ll [new file with mode: 0644]
llvm/test/Assembler/invalid-datalayout21.ll [new file with mode: 0644]