diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-20 06:20:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-20 06:20:21 +0000 |
commit | 5100367ff39c47492b7ceae3a3ee3b28372fff6e (patch) | |
tree | 5c63d321c64a8fc4e8755501aeb2f958a5bde56a /llvm/test/CodeGen/PowerPC | |
parent | 52c28fe61a6e58e158b360607ea76069a7a9ba60 (diff) | |
download | bcm5719-llvm-5100367ff39c47492b7ceae3a3ee3b28372fff6e.tar.gz bcm5719-llvm-5100367ff39c47492b7ceae3a3ee3b28372fff6e.zip |
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.
llvm-svn: 101879
Diffstat (limited to 'llvm/test/CodeGen/PowerPC')
-rw-r--r-- | llvm/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll b/llvm/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll index 32ddb348481..1ba11d3fd03 100644 --- a/llvm/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll +++ b/llvm/test/CodeGen/PowerPC/2010-02-04-EmptyGlobal.ll @@ -8,4 +8,13 @@ ; CHECK: .globl __cmd ; CHECK-NEXT: .align 3 ; CHECK-NEXT: __cmd: -; CHECK-NEXT: .space 1 +; CHECK-NEXT: .byte 0 + +; PR6340 + +%Ty = type { i32, {}, i32 } +@k = global %Ty { i32 1, {} zeroinitializer, i32 3 } + +; CHECK: _k: +; CHECK-NEXT: .long 1 +; CHECK-NEXT: .long 3 |