Fangrui Song
d054c7ee2e
Add test utility 'extract'
...
See https://lists.llvm.org/pipermail/llvm-dev/2020-July/143373.html
"[llvm-dev] Multiple documents in one test file" for some discussions.
`extract part filename` splits the input file into multiple parts separated by
regex `^(.|//)--- ` and extract the specified part to stdout or the
output file (if specified).
Use case A (organizing input of different formats (e.g. linker
script+assembly) in one file).
```
// RUN: extract lds %s -o %t.lds
// RUN: extract asm %s -o %t.s
// RUN: llvm-mc %t.s -o %t.o
// RUN: ld.lld -T %t.lds %t.o -o %t
This is sometimes better than the %S/Inputs/ approach because the user
can see the auxiliary files immediately and don't have to open another file.
```
Use case B (for utilities which don't have built-in input splitting
feature):
```
// RUN: extract case1 %s | llc | FileCheck %s --check-prefix=CASE1
// RUN: extract case2 %s | llc | FileCheck %s --check-prefix=CASE2
Combing tests prudently can improve readability.
This is sometimes better than having multiple test files.
```
Since this is a new utility, there is no git history concerns for
UpperCase variable names. I use lowerCase variable names like mlir/lld.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D83834
2020-07-23 19:15:35 -07:00
..
2020-03-19 09:29:23 -07:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-03-05 09:53:14 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2019-08-30 10:17:16 +00:00
2020-07-05 05:14:00 +03:00
2020-02-19 15:09:19 +03:00
2020-03-14 17:44:57 +03:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2019-10-11 12:50:57 +00:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-03-14 17:44:57 +03:00
2019-09-14 01:36:16 +00:00
2019-09-14 01:36:31 +00:00
2019-10-02 12:41:25 +00:00
2020-04-27 11:20:41 -07:00
2020-04-06 17:22:56 -05:00
2020-05-01 14:25:37 -07:00
2020-03-14 17:44:57 +03:00
2020-03-14 17:44:57 +03:00
2020-03-14 17:44:57 +03:00
2019-10-11 12:50:57 +00:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-03-14 17:44:57 +03:00
2020-03-14 17:44:57 +03:00
2020-06-24 19:56:01 -05:00
2020-01-21 17:20:18 -08:00
2020-04-19 20:10:05 -07:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-06-05 10:45:51 -07:00
2020-05-05 08:26:34 -07:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-03-14 17:44:57 +03:00
2019-08-20 15:34:07 +00:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-06-29 10:42:03 +01:00
2020-01-21 17:20:18 -08:00
2019-09-25 03:41:01 +00:00
2019-10-20 14:47:17 +00:00
2020-04-22 12:49:05 +03:00
2020-04-20 21:18:48 -07:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-03-16 07:42:04 -07:00
2020-03-14 17:44:57 +03:00
2019-09-14 01:36:16 +00:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2019-10-20 14:47:17 +00:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-03-14 17:44:57 +03:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-30 17:56:12 -08:00
2019-09-17 08:38:53 +00:00
2019-09-17 08:38:53 +00:00
2020-03-14 17:44:57 +03:00
2020-03-04 12:22:12 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-04-17 12:35:25 +03:00
2019-10-20 14:47:17 +00:00
2020-06-11 12:54:53 +03:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2019-10-30 13:17:22 +03:00
2020-01-21 17:20:18 -08:00
2020-05-29 20:24:53 +07:00
2020-05-29 20:24:53 +07:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2019-09-14 01:14:43 +00:00
2019-08-20 15:00:07 +00:00
2020-01-21 17:20:18 -08:00
2020-03-14 17:44:57 +03:00
2020-03-14 17:44:57 +03:00
2019-10-20 14:47:17 +00:00
2019-10-25 13:25:56 +03:00
2020-01-21 17:20:18 -08:00
2020-04-15 13:09:51 +03:00
2020-01-21 17:20:18 -08:00
2020-04-06 14:47:05 +01:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-04-20 21:18:48 -07:00
2020-05-19 12:59:13 +03:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-02-26 08:57:23 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-07-23 19:15:35 -07:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-30 17:56:12 -08:00
2020-03-14 17:44:57 +03:00
2020-03-14 17:44:57 +03:00
2020-03-14 17:44:57 +03:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00
2020-01-21 17:20:18 -08:00