2024-02-22 06:10:29 -06:00
|
|
|
//@ compile-flags: -O -Zcross-crate-inline-threshold=yes
|
|
|
|
//@ aux-build:leaf.rs
|
2023-11-06 18:55:05 -06:00
|
|
|
|
|
|
|
#![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()
|
|
|
|
}
|