Add -Zcross-crate-inline-threshold=yes
This commit is contained in:
parent
aea82b268a
commit
fcdd99edca
10 changed files with 161 additions and 13 deletions
20
tests/codegen/cross-crate-inlining/leaf-inlining.rs
Normal file
20
tests/codegen/cross-crate-inlining/leaf-inlining.rs
Normal file
|
@ -0,0 +1,20 @@
|
|||
// compile-flags: -O -Zcross-crate-inline-threshold=yes
|
||||
// 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()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue