1
Fork 0

Properly check target_features not to trigger an assertion

This commit is contained in:
Yuki Okushi 2021-10-21 04:56:36 +09:00
parent bd309e4628
commit 12647eab79
No known key found for this signature in database
GPG key ID: DABA5B072961C18A
4 changed files with 11 additions and 4 deletions

View file

@ -845,6 +845,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
options: ast::InlineAsmOptions,
line_spans: &[Span],
destination: Option<mir::BasicBlock>,
instance: Instance<'_>,
) {
let span = terminator.source_info.span;
@ -898,7 +899,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
})
.collect();
bx.codegen_inline_asm(template, &operands, options, line_spans);
bx.codegen_inline_asm(template, &operands, options, line_spans, instance);
if let Some(target) = destination {
helper.funclet_br(self, &mut bx, target);
@ -1029,6 +1030,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
options,
line_spans,
destination,
self.instance,
);
}
}

View file

@ -58,6 +58,7 @@ pub trait AsmBuilderMethods<'tcx>: BackendTypes {
operands: &[InlineAsmOperandRef<'tcx, Self>],
options: InlineAsmOptions,
line_spans: &[Span],
instance: Instance<'_>,
);
}