From a27f3e3fd1e4d16160f8885b6b06665b5319f56c Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 21 Jul 2025 14:34:12 +0200 Subject: Rename `tests/codegen` into `tests/codegen-llvm` --- tests/codegen-llvm/README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/codegen-llvm/README.md (limited to 'tests/codegen-llvm/README.md') diff --git a/tests/codegen-llvm/README.md b/tests/codegen-llvm/README.md new file mode 100644 index 00000000000..8f2daaafcc7 --- /dev/null +++ b/tests/codegen-llvm/README.md @@ -0,0 +1,24 @@ +The files here use the LLVM FileCheck framework, documented at +. + +One extension worth noting is the use of revisions as custom prefixes for +FileCheck. If your codegen test has different behavior based on the chosen +target or different compiler flags that you want to exercise, you can use a +revisions annotation, like so: + +```rust +// revisions: aaa bbb +// [bbb] compile-flags: --flags-for-bbb +``` + +After specifying those variations, you can write different expected, or +explicitly *unexpected* output by using `-SAME:` and `-NOT:`, +like so: + +```rust +// CHECK: expected code +// aaa-SAME: emitted-only-for-aaa +// aaa-NOT: emitted-only-for-bbb +// bbb-NOT: emitted-only-for-aaa +// bbb-SAME: emitted-only-for-bbb +``` -- cgit 1.4.1-3-g733a5