[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:54:39 PDT 2020


MaskRay added a comment.

In D83725#2148926 <https://reviews.llvm.org/D83725#2148926>, @rsmith wrote:

> Would it make sense to split this into a separate utility, so you could use (eg)
>
>   # RUN: extract bb %s | llvm-mc - 2>&1 | FileCheck %s --check-prefix=BB
>
>
> in general, for any tool that can read from stdin? Or even
>
>   # RUN: extract bb %s -o %t.bb
>   # RUN: llvm-mc %t.bb 2>&1 | FileCheck %t.bb
>
>
> ... to consider only the `CHECK` lines in the extracted region?


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 considered an in-utility option first because the syntax is the simplest. `extract bb %s -o %t.bb` is a bit long but I can accept it)


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