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

Richard Smith - zygoloid via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 18:02:31 PDT 2020


rsmith added a comment.

In D83725#2148934 <https://reviews.llvm.org/D83725#2148934>, @MaskRay wrote:

> In D83725#2148926 <https://reviews.llvm.org/D83725#2148926>, @rsmith wrote:
>
> > Would it make sense to split this into a separate utility[...]?
>
>
> Teach the extract utility about comment markers of common file extensions (.s, .ll, .c, .cpp)? (To make editors happy, the separator should be a comment in that file (e.g. `#` `;` `//` `---` etc))


I was thinking that you could scan the source file for lines containing your separator (eg `---`) and assume the comment marker is whatever comes before it. That seems to work well enough for `lit` (looking for `RUN:` etc, preceded by anything).


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