Teach DataLayout that ABI alignments for non-aggregate types must be non-zero.
authorOwen Anderson <resistor@mac.com>
Mon, 2 Mar 2015 09:34:59 +0000 (09:34 +0000)
committerOwen Anderson <resistor@mac.com>
Mon, 2 Mar 2015 09:34:59 +0000 (09:34 +0000)
commitab1c7a77d27d5482f2159bc26297d875db13b936
treef5e91b0f8347dee376b16aed282d3a16210ae279
parent040f2f890e95d777e19cb11f090095c86c8d2034
Teach DataLayout that ABI alignments for non-aggregate types must be non-zero.

This manifested as assertions and/or crashes in later phases of optimization,
depending on the build configuration.

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