Teach DataLayout that zero-byte pointer sizes don't make sense.
authorOwen Anderson <resistor@mac.com>
Mon, 2 Mar 2015 06:00:02 +0000 (06:00 +0000)
committerOwen Anderson <resistor@mac.com>
Mon, 2 Mar 2015 06:00:02 +0000 (06:00 +0000)
commitf212856e5032c8ee760f6bb67190da01db296535
tree60fa6051740e1fd920df7232b6de76ca80b25909
parent0923ca275bac81966b0662c2d3eb0e455db432d6
Teach DataLayout that zero-byte pointer sizes don't make sense.

Previously this would result in assertion failures or simply crashes
at various points in the optimizer when trying to create types of zero
bit width.

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