mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 00:32:23 +00:00
44e05080f8
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
21 lines
439 B
LLVM
21 lines
439 B
LLVM
; RUN: llc < %s -mtriple=powerpc-apple-darwin10 -relocation-model=pic -disable-fp-elim | FileCheck %s
|
|
; <rdar://problem/7604010>
|
|
|
|
%cmd.type = type { }
|
|
|
|
@_cmd = constant %cmd.type zeroinitializer
|
|
|
|
; CHECK: .globl __cmd
|
|
; CHECK-NEXT: .align 3
|
|
; CHECK-NEXT: __cmd:
|
|
; 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
|