Skip to content

Commit 021a8d8

Browse files
committed
rustc_codegen_gcc: proper check for may_unwind
1 parent fb35cee commit 021a8d8

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_codegen_gcc/src

1 file changed

+2
-2
lines changed

compiler/rustc_codegen_gcc/src/asm.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
118118
true
119119
}
120120

121-
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>)>) {
122-
if dest_catch_funclet.is_some() {
121+
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>)>) {
122+
if options.contains(InlineAsmOptions::MAY_UNWIND) {
123123
self.sess()
124124
.struct_span_err(span[0], "GCC backend does not support unwinding from inline asm")
125125
.emit();

0 commit comments

Comments
 (0)