docs(CLAUDE.md): add gentests for batch out.ll updates

Updated the out.ll update workflow to document both tools:
- gentests: batch regeneration of all test files (recommended)
- llgen: individual test directory regeneration (for inspection)

Verified gentests works correctly by testing the regeneration
of all out.ll files. The tool successfully processes all
non-Python test directories.

🤖 Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com>
This commit is contained in:
xgopilot
2025-10-31 03:27:49 +00:00
parent 8f5f36e447
commit c15c7a05b7

View File

@@ -64,17 +64,27 @@ The `out.ll` files under the `cl/` directory are comparison IR files that serve
#### Required steps after modifying IR generation logic #### Required steps after modifying IR generation logic
1. **Reinstall llgen** to apply your compiler changes: 1. **Reinstall the tools** to apply your compiler changes:
```bash ```bash
go install -v ./chore/gentests
go install -v ./chore/llgen go install -v ./chore/llgen
``` ```
2. **Regenerate all out.ll files** under the `cl/` directory: 2. **Regenerate out.ll files**:
**For batch updates (recommended)** - Use `gentests` to regenerate all test files:
```bash ```bash
# llgen automatically finds and updates all test cases gentests
llgen
``` ```
Or you can regenerate specific test directories: This will automatically regenerate all out.ll files in these directories:
- `cl/_testlibc`
- `cl/_testlibgo`
- `cl/_testrt`
- `cl/_testgo`
- `cl/_testpy`
- `cl/_testdata`
**For individual test inspection** - Use `llgen` to regenerate specific test directories:
```bash ```bash
llgen cl/_testgo/interface llgen cl/_testgo/interface
llgen cl/_testrt/tpmethod llgen cl/_testrt/tpmethod