blob: 650d5b230f4c23a52cc90061047cc9f04fa7d108 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// no-system-llvm: needs #92110
// compile-flags: -Cno-prepopulate-passes
#![crate_type = "lib"]
// This test checks that drop calls in unwind landing pads
// get the `cold` attribute.
// CHECK-LABEL: @check_cold
// CHECK: call void {{.+}}drop_in_place{{.+}} [[ATTRIBUTES:#[0-9]+]]
// CHECK: attributes [[ATTRIBUTES]] = { cold }
#[no_mangle]
pub fn check_cold(f: fn(), x: Box<u32>) {
// this may unwind
f();
}
|