From c15c7a05b710179582dfcc4bc86b9776075a9165 Mon Sep 17 00:00:00 2001 From: xgopilot Date: Fri, 31 Oct 2025 03:27:49 +0000 Subject: [PATCH] docs(CLAUDE.md): add gentests for batch out.ll updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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> --- CLAUDE.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index d52e8b84..05316b54 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -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 -1. **Reinstall llgen** to apply your compiler changes: +1. **Reinstall the tools** to apply your compiler changes: ```bash + go install -v ./chore/gentests 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 - # llgen automatically finds and updates all test cases - llgen + gentests ``` - 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 llgen cl/_testgo/interface llgen cl/_testrt/tpmethod