mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-01 09:32:15 +00:00
Rollup of 10 pull requests Successful merges: - rust-lang/rust#158410 (Update LLVM for Mach-O __LINKEDIT alignment fix.) - rust-lang/rust#157397 (cmse: clear padding when crossing the secure boundary) - rust-lang/rust#158036 (Add -Zinstrument-mcount=fentry to -Zinstrument-mcount) - rust-lang/rust#158330 (llvm: use intrinsics for f16, f32 minimum/maximum) - rust-lang/rust#158359 (fix(tests): allow either branch direction in ilog_known_base) - rust-lang/rust#158067 (LLVM 23: Adapt codegen test to moved assume) - rust-lang/rust#158261 (Move part of the target checking for `#[may_dangle]` to the parser) - rust-lang/rust#158358 (Fix invalid E0609 raw pointer deref suggestion inside macros) - rust-lang/rust#158392 (delegation: add tests for defaults and infers in generics) - rust-lang/rust#158394 (Generate synthetic generic args only for delegation's child segment)
The files here use the LLVM FileCheck framework, documented at https://llvm.org/docs/CommandGuide/FileCheck.html.
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:
// revisions: aaa bbb
// [bbb] compile-flags: --flags-for-bbb
After specifying those variations, you can write different expected, or
explicitly unexpected output by using <prefix>-SAME: and <prefix>-NOT:,
like so:
// 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