[PATCH] D54348: Permit multiple .file directives with -g

Brian Cain via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 9 13:28:59 PST 2018


bcain added a comment.

The `directive_file-4.s` test passes and no existing tests fail with this change.

Paul, you suggested keeping a table of the source locs for labels that gets flushed at ".file 1 foo".  This doesn't implement that, but it appears to resolve the assertion in the provided test case.  Do you think it's sufficient?

Also, we lose the power to detect "file number already allocated" with this change -- I deleted it to avoid failures introduced by the other change.  So I suspect this patch may not be quite right as is, but I'd happily take suggestions on a better approach.



================
Comment at: llvm/test/MC/AsmParser/directive_file-5.s:7-12
+        .file "xyz.c"
+.text
+
+f1:
+        nop
+        .file 1 "abc.c"
----------------
TBD: nothing has yet been added to reject this code.


Repository:
  rL LLVM

https://reviews.llvm.org/D54348





More information about the llvm-commits mailing list