[PATCH] D63573: Fix a crash with assembler source and -g.

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 19 14:36:39 PDT 2019


probinson added a comment.

We do not precisely match gcc/gas behavior in some more-peculiar cases, but my assertion is that those should not occur "naturally" and so it's okay.  For example:

  foo:
      nop
      .file 1 "a.c"

This will cause gcc/gas to emit an error to the effect that file number 1 is already defined (implicitly, because of the line-table record for the first instruction).  Clang/llvm-mc will not, we'll just emit an odd-looking line table.  I can see how to cause clang/llvm-mc to emit this error, but it feels like it would be a hack done just to match gcc's (likely unintentional) error-detection behavior for an ill-formed assembler file.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63573/new/

https://reviews.llvm.org/D63573





More information about the llvm-commits mailing list