Just because a GlobalVariable's initializer is [N x { i32, void ()* }] doesn't
authorNick Lewycky <nicholas@mxc.ca>
Mon, 11 Apr 2011 22:11:20 +0000 (22:11 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Mon, 11 Apr 2011 22:11:20 +0000 (22:11 +0000)
commit5ea5c61589e62a1068746ddcc52c6aa39ec0f8b0
tree1373b522ec09033902f70e08c9371fcb6bc652cf
parenta61842bf6ec00385488ef63df00f4627ca22b233
Just because a GlobalVariable's initializer is [N x { i32, void ()* }] doesn't
mean that it has to be ConstantArray of ConstantStruct. We might have
ConstantAggregateZero, at either level, so don't crash on that.

Also, semi-deprecate the sentinal value. The linker isn't aware of sentinals so
we end up with the two lists appended, each with their "sentinals" on them.
Different parts of LLVM treated sentinals differently, so make them all just
ignore the single entry and continue on with the rest of the list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129307 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/ELFWriter.cpp
lib/ExecutionEngine/ExecutionEngine.cpp
lib/Transforms/IPO/GlobalOpt.cpp