blob: 573ae1ba68d4d92606d0e33360711cf5ce00fe3c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// Tests inlining of `may_unwind` inline assembly.
//
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// needs-asm-support
// compile-flags: -Zinline-mir-hint-threshold=1000
#![feature(asm_unwind)]
struct D;
impl Drop for D {
fn drop(&mut self) {}
}
#[inline]
fn foo() {
let _d = D;
unsafe { std::arch::asm!("", options(may_unwind)) };
}
// EMIT_MIR asm_unwind.main.Inline.diff
pub fn main() {
foo();
}
|