diff options
| author | Yuki Okushi <yuki.okushi@huawei.com> | 2021-10-21 04:56:36 +0900 |
|---|---|---|
| committer | Yuki Okushi <yuki.okushi@huawei.com> | 2021-10-26 11:02:51 +0900 |
| commit | 12647eab7945df1ceddd4d191cdb489abfb05276 (patch) | |
| tree | 887d412993cc29c6a302ef79f7096e07a9d1f8a3 /compiler/rustc_codegen_ssa/src | |
| parent | bd309e4628f5d7d1fa6cbe6a1776e74bcac6292a (diff) | |
| download | rust-12647eab7945df1ceddd4d191cdb489abfb05276.tar.gz rust-12647eab7945df1ceddd4d191cdb489abfb05276.zip | |
Properly check `target_features` not to trigger an assertion
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/block.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/traits/asm.rs | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs index b0a5631549d..7c25438380a 100644 --- a/compiler/rustc_codegen_ssa/src/mir/block.rs +++ b/compiler/rustc_codegen_ssa/src/mir/block.rs @@ -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, ); } } diff --git a/compiler/rustc_codegen_ssa/src/traits/asm.rs b/compiler/rustc_codegen_ssa/src/traits/asm.rs index 86f2781a766..31f539e1b03 100644 --- a/compiler/rustc_codegen_ssa/src/traits/asm.rs +++ b/compiler/rustc_codegen_ssa/src/traits/asm.rs @@ -58,6 +58,7 @@ pub trait AsmBuilderMethods<'tcx>: BackendTypes { operands: &[InlineAsmOperandRef<'tcx, Self>], options: InlineAsmOptions, line_spans: &[Span], + instance: Instance<'_>, ); } |
