blob: 1d7cb2bea60aa0a266f0b90875236ae4dd7d6d9f [file]
//@ revisions: Always NonLeaf
//@ [Always] compile-flags: -Cforce-frame-pointers=yes
//@ [NonLeaf] compile-flags: -Cforce-frame-pointers=non-leaf
//@ compile-flags: -Zunstable-options
//@ compile-flags: -C no-prepopulate-passes -Copt-level=0
//@ [NonLeaf] ignore-illumos
//@ [NonLeaf] ignore-openbsd
//@ [NonLeaf] ignore-x86
//@ [NonLeaf] ignore-x86_64-apple-darwin
//@ [NonLeaf] ignore-windows-gnu
//@ [NonLeaf] ignore-thumb
// On s390x, -Cforce-frame-pointers emits `"backchain"` not `"frame-pointer"`.
// Since this test passes -Zunstable-options globally, it must be skipped on s390x.
//@ ignore-s390x
// result is platform-dependent based on platform's frame pointer settings
#![crate_type = "lib"]
// Always: attributes #{{.*}} "frame-pointer"="all"
// NonLeaf: attributes #{{.*}} "frame-pointer"="non-leaf"
pub fn foo() {}
// Always: !{{[0-9]+}} = !{i32 7, !"frame-pointer", i32 2}
// NonLeaf: !{{[0-9]+}} = !{i32 7, !"frame-pointer", i32 1}