Bill's change in r95336 broke empty aggregates embedded
authorChris Lattner <sabre@nondot.org>
Tue, 20 Apr 2010 06:20:21 +0000 (06:20 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 20 Apr 2010 06:20:21 +0000 (06:20 +0000)
commit44e05080f828e80e262fc00cc1fa48a8a37b7f3e
treea3caf9c82828313c29f2f06c5793f846ca9d8ceb
parentaa2776e93451aa6d1311c109b16d02428f86865a
Bill's change in r95336 broke empty aggregates embedded
in other types.  fix this by only bumping zero-byte globals
up to a single byte if the *entire global* is zero size,
fixing PR6340.

This also fixes empty arrays etc to be handled correctly,
and only does this on subsection-via-symbols targets (aka
darwin) which is the only place where this matters.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101879 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll