about summary refs log tree commit diff
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
commit4fa64fd1c3f29598b9256d37c3c891fcff04f92d (patch)
tree12eff4fb951be10458ba5c0308226916bff30b19
parentb7cb08d4e7a1586b801431f451328821c481cbd3 (diff)
downloadrust-4fa64fd1c3f29598b9256d37c3c891fcff04f92d.tar.gz
rust-4fa64fd1c3f29598b9256d37c3c891fcff04f92d.zip
rustc_codegen_gcc: proper check for may_unwind
-rw-r--r--src/asm.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/asm.rs b/src/asm.rs
index c205a6ed4a2..6a3b94a0d70 100644
--- a/src/asm.rs
+++ b/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();