about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift
diff options
context:
space:
mode:
authorcynecx <me@cynecx.net>2021-09-04 22:14:09 +0200
committercynecx <me@cynecx.net>2021-12-03 23:51:49 +0100
commit6cbf44f1d46a4b31e633c10a025dae93f01b797e (patch)
tree83f8f773e723b8912811cb0c06caade0de54da47 /compiler/rustc_codegen_cranelift
parent91021de1f67de546b7ef41e03fc787f03ecf2239 (diff)
downloadrust-6cbf44f1d46a4b31e633c10a025dae93f01b797e.tar.gz
rust-6cbf44f1d46a4b31e633c10a025dae93f01b797e.zip
cg_cranelift: check may_unwind flag instead of cleanup
Diffstat (limited to 'compiler/rustc_codegen_cranelift')
-rw-r--r--compiler/rustc_codegen_cranelift/src/base.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/base.rs b/compiler/rustc_codegen_cranelift/src/base.rs
index 5cf6d95412b..371c71de62f 100644
--- a/compiler/rustc_codegen_cranelift/src/base.rs
+++ b/compiler/rustc_codegen_cranelift/src/base.rs
@@ -1,6 +1,7 @@
 //! Codegen of a single function
 
 use cranelift_codegen::binemit::{NullStackMapSink, NullTrapSink};
+use rustc_ast::InlineAsmOptions;
 use rustc_index::vec::IndexVec;
 use rustc_middle::ty::adjustment::PointerCast;
 use rustc_middle::ty::layout::FnAbiOf;
@@ -379,9 +380,9 @@ fn codegen_fn_content(fx: &mut FunctionCx<'_, '_, '_>) {
                 options,
                 destination,
                 line_spans: _,
-                cleanup,
+                cleanup: _,
             } => {
-                if cleanup.is_some() {
+                if options.contains(InlineAsmOptions::MAY_UNWIND) {
                     fx.tcx.sess.span_fatal(
                         source_info.span,
                         "cranelift doesn't support unwinding from inline assembly.",