Skip to content

Commit dd3cb0c

Browse files
committed
cg_cranelift: check may_unwind flag instead of cleanup
1 parent 5728c16 commit dd3cb0c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/base.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//! Codegen of a single function
22
33
use cranelift_codegen::binemit::{NullStackMapSink, NullTrapSink};
4+
use rustc_ast::InlineAsmOptions;
45
use rustc_index::vec::IndexVec;
56
use rustc_middle::ty::adjustment::PointerCast;
67
use rustc_middle::ty::layout::FnAbiOf;
@@ -379,9 +380,9 @@ fn codegen_fn_content(fx: &mut FunctionCx<'_, '_, '_>) {
379380
options,
380381
destination,
381382
line_spans: _,
382-
cleanup,
383+
cleanup: _,
383384
} => {
384-
if cleanup.is_some() {
385+
if options.contains(InlineAsmOptions::MAY_UNWIND) {
385386
fx.tcx.sess.span_fatal(
386387
source_info.span,
387388
"cranelift doesn't support unwinding from inline assembly.",

0 commit comments

Comments
 (0)