]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/stack-probes-call.rs
Rollup merge of #102405 - hkBst:patch-3, r=Mark-Simulacrum
[rust.git] / src / test / codegen / stack-probes-call.rs
1 // Check the "probe-stack" attribute for targets with `StackProbeType::Call`,
2 // or `StackProbeType::InlineOrCall` when running on older LLVM.
3
4 // compile-flags: -C no-prepopulate-passes
5 // revisions: i686 x86_64
6 //[i686] compile-flags: --target i686-unknown-linux-gnu
7 //[i686] needs-llvm-components: x86
8 //[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
9 //[x86_64] needs-llvm-components: x86
10
11 #![crate_type = "rlib"]
12 #![feature(no_core, lang_items)]
13 #![no_core]
14
15 #[lang = "sized"]
16 trait Sized {}
17
18 #[no_mangle]
19 pub fn foo() {
20 // CHECK: @foo() unnamed_addr #0
21 // CHECK: attributes #0 = { {{.*}}"probe-stack"="__rust_probestack"{{.*}} }
22 }