jofrn wrote: It happens in my workflow that one would want to look at a single function, like when using a debugger or adding print statements. The point of this is to not have to create a new file and to invoke strictly from the command-line, as mentioned. We keeping looping back to this same point. Here is an example:
Consider a test's RUN line just over `@my_fn` in `some-file.ll`. Without this: 1. Copy `@my_fn` and its dependencies to a temp file, `/tmp/temp-file.ll`. 2. Copy the RUN line contents over to the command line. 3. Run `RUN-line-contents /tmp/temp-file.ll` 4. Delete the temp file when done. With this: `$ llvm-lit --param fn=my_fn some-file.ll` becomes `llvm-extract --func=my_fn some-file.ll -o - | opt -passes=pass -S | FileCheck --filter-label=my_fn some-file.ll`, implicitly, and llvm-lit reports the test as PASS or FAIL in one fell-swoop. Hacking on the test can be done in-place. Both workflows are now possible. Thanks. https://github.com/llvm/llvm-project/pull/200351 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
