llvm-6502/test/MC/COFF/comm.ll
David Majnemer e4d89ec8de WinCOFF: Emit common symbols as specified in the COFF spec
Summary:
Local common symbols were properly inserted into the .bss section.
However, putting external common symbols in the .bss section would give
them a strong definition.

Instead, encode them as undefined, external symbols who's symbol value
is equivalent to their size.

Reviewers: Bigcheese, rafael, rnk

CC: llvm-commits

Differential Revision: http://reviews.llvm.org/D3324

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205811 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-08 22:33:40 +00:00

14 lines
365 B
LLVM

; RUN: llc -mtriple i386-pc-mingw32 < %s | FileCheck %s
@a = internal global i8 0, align 1
@b = internal global double 0.000000e+00, align 8
@c = common global i8 0, align 1
@d = common global double 0.000000e+00, align 8
; .lcomm uses byte alignment
; CHECK: .lcomm _a,1
; CHECK: .lcomm _b,8,8
; .comm uses log2 alignment
; CHECK: .comm _c,1
; CHECK: .comm _d,8