about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc/src/asm.rs
diff options
context:
space:
mode:
authorcynecx <me@cynecx.net>2021-11-19 23:37:09 +0100
committercynecx <me@cynecx.net>2021-12-03 23:51:49 +0100
commit021a8d80ebeeb4cf96213745cc591be9216ffe44 (patch)
treedbd6b751240fb188a104ff412946f28e6556b20c /compiler/rustc_codegen_gcc/src/asm.rs
parentfb35cee709119dcc623eb57ae6aa0c1ca56c1481 (diff)
downloadrust-021a8d80ebeeb4cf96213745cc591be9216ffe44.tar.gz
rust-021a8d80ebeeb4cf96213745cc591be9216ffe44.zip
rustc_codegen_gcc: proper check for may_unwind
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/asm.rs')
-rw-r--r--compiler/rustc_codegen_gcc/src/asm.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_gcc/src/asm.rs b/compiler/rustc_codegen_gcc/src/asm.rs
index c205a6ed4a2..6a3b94a0d70 100644
--- a/compiler/rustc_codegen_gcc/src/asm.rs
+++ b/compiler/rustc_codegen_gcc/src/asm.rs
@@ -118,8 +118,8 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
         true
     }
 
-    fn codegen_inline_asm(&mut self, template: &[InlineAsmTemplatePiece], rust_operands: &[InlineAsmOperandRef<'tcx, Self>], options: InlineAsmOptions, span: &[Span], _instance: Instance<'_>, dest_catch_funclet: Option<(Self::BasicBlock, Self::BasicBlock, Option<&Self::Funclet>)>) {
-        if dest_catch_funclet.is_some() {
+    fn codegen_inline_asm(&mut self, template: &[InlineAsmTemplatePiece], rust_operands: &[InlineAsmOperandRef<'tcx, Self>], options: InlineAsmOptions, span: &[Span], _instance: Instance<'_>, _dest_catch_funclet: Option<(Self::BasicBlock, Self::BasicBlock, Option<&Self::Funclet>)>) {
+        if options.contains(InlineAsmOptions::MAY_UNWIND) {
             self.sess()
                 .struct_span_err(span[0], "GCC backend does not support unwinding from inline asm")
                 .emit();