]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/unwind-landingpad-cold.rs
Auto merge of #92314 - Kobzol:encoding-u16-leb128, r=michaelwoerister
[rust.git] / src / test / codegen / unwind-landingpad-cold.rs
1 // no-system-llvm: needs #92110
2 // compile-flags: -Cno-prepopulate-passes
3 #![crate_type = "lib"]
4
5 // This test checks that drop calls in unwind landing pads
6 // get the `cold` attribute.
7
8 // CHECK-LABEL: @check_cold
9 // CHECK: call void {{.+}}drop_in_place{{.+}} [[ATTRIBUTES:#[0-9]+]]
10 // CHECK: attributes [[ATTRIBUTES]] = { cold }
11 #[no_mangle]
12 pub fn check_cold(f: fn(), x: Box<u32>) {
13     // this may unwind
14     f();
15 }