1 // compile-flags:-Clink-dead-code
3 #![crate_type = "rlib"]
5 // This test makes sure that, when -Clink-dead-code is specified, we generate
6 // code for functions that would otherwise be skipped.
8 // CHECK-LABEL: define hidden i32 @_ZN14link_dead_code8const_fn
9 const fn const_fn() -> i32 { 1 }
11 // CHECK-LABEL: define hidden i32 @_ZN14link_dead_code9inline_fn
13 fn inline_fn() -> i32 { 2 }
15 // CHECK-LABEL: define hidden i32 @_ZN14link_dead_code10private_fn
16 fn private_fn() -> i32 { 3 }