[PATCH] D38605: [MC] Move .seh_ directive implementation to MCObjectStreamer

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 5 15:51:06 PDT 2017


rnk created this revision.
Herald added subscribers: hiraditya, aprantl.

This suppresses the generation of .Lcfi labels in our textual assembler
output when targetting Win64. It was annoying that this generates
cascading .Lcfi labels:

  llc foo.ll -o - | llvm-mc | llvm-mc

After three trips through MCAsmStreamer, we'd have three labels in the
output when none are necessary. We should only bother creating the
labels and frame data when making a real object file.

With this change, we will not check for mis-ordered .seh directives when
generating textual assembly. Personally, that seems like a reasonable
cost to pay to clean our assembly output.

This was a test before attempting to sink the generation of .Lcfi labels
for DWARF .cfi_ directives. If people like this, I will try that next.


https://reviews.llvm.org/D38605

Files:
  llvm/include/llvm/MC/MCObjectStreamer.h
  llvm/include/llvm/MC/MCStreamer.h
  llvm/include/llvm/MC/MCWin64EH.h
  llvm/include/llvm/MC/MCWinEH.h
  llvm/lib/MC/MCAsmStreamer.cpp
  llvm/lib/MC/MCObjectStreamer.cpp
  llvm/lib/MC/MCStreamer.cpp
  llvm/lib/MC/MCWin64EH.cpp
  llvm/test/MC/AsmParser/directive_seh.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38605.117920.patch
Type: text/x-patch
Size: 26040 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171005/8a2fd90d/attachment-0001.bin>


More information about the llvm-commits mailing list