2025-02-08 19:45:40 -08:00
|
|
|
//@ compile-flags: -Copt-level=3 -Zcross-crate-inline-threshold=yes
|
2023-11-06 19:55:05 -05:00
|
|
|
//@ aux-build:leaf.rs
|
|
|
|
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
|
|
|
|
extern crate leaf;
|
|
|
|
|
|
|
|
// Check that we inline a leaf cross-crate call
|
|
|
|
#[no_mangle]
|
|
|
|
pub fn leaf_outer() -> String {
|
|
|
|
// CHECK-NOT: call {{.*}}leaf_fn
|
|
|
|
leaf::leaf_fn()
|
|
|
|
}
|
|
|
|
|
|
|
|
// Check that we do not inline a non-leaf cross-crate call
|
|
|
|
#[no_mangle]
|
|
|
|
pub fn stem_outer() -> String {
|
|
|
|
// CHECK: call {{.*}}stem_fn
|
|
|
|
leaf::stem_fn()
|
|
|
|
}
|