[PATCH] D21146: Fix BSS global handling in AsmPrinter

Nirav Dave via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 11:15:06 PDT 2016


niravd created this revision.
niravd added reviewers: echristo, rafael.
niravd added a subscriber: llvm-commits.
Herald added a subscriber: mehdi_amini.

Change EmitGlobalVariable to check final assembler section is in BSS
before using .lcomm/.comm directive. This prevents globals from being
put into .bss erroneously when -data-sections is used.

This fixes PR26570.

http://reviews.llvm.org/D21146

Files:
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  test/CodeGen/X86/global-sections.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21146.60070.patch
Type: text/x-patch
Size: 4082 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160608/2764313f/attachment.bin>


More information about the llvm-commits mailing list