[PATCH] D48517: [MC] Error on a .zerofill directive in a non-virtual section

Francis Visoiu Mistrih via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 23 02:35:26 PDT 2018


thegameg created this revision.
thegameg added reviewers: pete, echristo, t.p.northover, ab.
Herald added subscribers: gbedwell, aheejin, sbc100.
Herald added a reviewer: andreadb.

On darwin, all virtual sections have zerofill type, and having a .zerofill directive in a non-virtual section is not allowed. Instead of asserting, show a nicer error.

In order to use the equivalent of .zerofill in a non-virtual section, the usage of .zero of .space is required.

This patch replaces the assert with an error.


https://reviews.llvm.org/D48517

Files:
  include/llvm/MC/MCELFStreamer.h
  include/llvm/MC/MCStreamer.h
  include/llvm/MC/MCWasmStreamer.h
  include/llvm/MC/MCWinCOFFStreamer.h
  lib/MC/MCAsmStreamer.cpp
  lib/MC/MCELFStreamer.cpp
  lib/MC/MCMachOStreamer.cpp
  lib/MC/MCNullStreamer.cpp
  lib/MC/MCParser/DarwinAsmParser.cpp
  lib/MC/MCWasmStreamer.cpp
  lib/MC/MCWinCOFFStreamer.cpp
  lib/Object/RecordStreamer.cpp
  lib/Object/RecordStreamer.h
  test/MC/MachO/zero-space.s
  test/MC/MachO/zerofill-text.s
  tools/llvm-mca/llvm-mca.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48517.152498.patch
Type: text/x-patch
Size: 16281 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180623/5d9d8cb5/attachment.bin>


More information about the llvm-commits mailing list