[PATCH] D83725: [llvm-mc] Add --doc-id=<id> to support multiple documents in a file

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 17:02:10 PDT 2020


MaskRay added a comment.

To give an example, let's discuss MC/ELF/debug-md5.s and MC/ELF/debug-md5-err.s. There are two things worth noting:

a) the error cases are in a separate file. Once you add an invalid .file, assembling the whole file is invalid. All the RUN lines have to be `not llvm-mc %s`. Thus, people tend to place good cases in one file and bad tests in another file. For some features, having both good and bad tests in one file may improve readability.
b) .debug_line is a global resource. Whenever we add a (valid) .file, we contribute an entry to the global resource. If we want to test some characteristics when include_directories[0] is A, and other characteristics when include_directories[0] is B. OK, we have to use another file.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83725





More information about the llvm-commits mailing list