OSDN Git Service

MC: Overhaul handling of .lcomm
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 7 Sep 2012 17:25:13 +0000 (17:25 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 7 Sep 2012 17:25:13 +0000 (17:25 +0000)
commit39646d96e76aea5d20bffb386233a0dbb5932a21
tree5de73a0fc45310a16dab5a01751ba4302b33a75a
parent8e70b5506ec0d7a6c2740bc89cd1b8f12a78b24f
MC: Overhaul handling of .lcomm

- Darwin lied about not supporting .lcomm and turned it into zerofill in the
  asm parser. Push the zerofill-conversion down into macho-specific code.
- This makes the tri-state LCOMMType enum superfluous, there are no targets
  without .lcomm.
- Do proper error reporting when trying to use .lcomm with alignment on a target
  that doesn't support it.
- .comm and .lcomm alignment was parsed in bytes on COFF, should be power of 2.
- Fixes PR13755 (.lcomm crashes on ELF).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163395 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
include/llvm/MC/MCAsmInfo.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/MC/MCAsmInfo.cpp
lib/MC/MCAsmInfoCOFF.cpp
lib/MC/MCAsmInfoDarwin.cpp
lib/MC/MCAsmStreamer.cpp
lib/MC/MCMachOStreamer.cpp
lib/MC/MCParser/AsmParser.cpp
lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp
lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp
lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp
test/MC/AsmParser/directive_lcomm.s
test/MC/AsmParser/labels.s
test/MC/ELF/lcomm.s [new file with mode: 0644]