Files
rust/tests/ui/codegen/remark-flag-functionality.rs
T
Zalathar cda9a68248 Rename //@ ignore-pass to //@ no-pass-override
By convention, compiletest directives starting with `ignore-*` normally cause
the test itself to be skipped under certain conditions.

The `//@ ignore-pass` directive was the only exception to that convention. The
new name should hopefully do a better job of communicating its effect, which is
to cause the `--pass` flag to not override the test's `build-pass` or
`run-pass` directive.

The `//@ no-pass-override` directive is mainly useful for tests that expect
warnings produced during codegen.
2026-05-13 17:24:59 +10:00

32 lines
893 B
Rust

//! Check that `-Cremark` flag correctly emits LLVM optimization remarks.
//!
//! Regression test for <https://github.com/rust-lang/rust/issues/90924>.
//@ build-pass
//@ no-pass-override (LLVM remarks are produced during codegen)
//@ revisions: all inline merge1 merge2
//@ compile-flags: --crate-type=lib -Cdebuginfo=1 -Copt-level=2
// Check that remarks can be enabled individually or with "all":
//@ [all] compile-flags: -Cremark=all
//@ [inline] compile-flags: -Cremark=inline
// Check that values of -Cremark flag are accumulated:
//@ [merge1] compile-flags: -Cremark=all -Cremark=giraffe
//@ [merge2] compile-flags: -Cremark=inline -Cremark=giraffe
//@ dont-check-compiler-stderr
//@ dont-require-annotations: NOTE
//@ ignore-backends: gcc
#[no_mangle]
#[inline(never)]
pub fn f() {}
#[no_mangle]
pub fn g() {
f();
}
//~? NOTE inline (missed): 'f' not inlined into 'g'