Skip to content

Commit 9f7bcd7

Browse files
committed
Minor changes to codegen_inline_asm_terminator
1 parent cdae1c9 commit 9f7bcd7

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/base.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
456456
);
457457
}
458458

459-
crate::inline_asm::codegen_inline_asm(
459+
crate::inline_asm::codegen_inline_asm_terminator(
460460
fx,
461461
source_info.span,
462462
template,

src/inline_asm.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ enum CInlineAsmOperand<'tcx> {
3434
},
3535
}
3636

37-
pub(crate) fn codegen_inline_asm<'tcx>(
37+
pub(crate) fn codegen_inline_asm_terminator<'tcx>(
3838
fx: &mut FunctionCx<'_, '_, 'tcx>,
3939
span: Span,
4040
template: &[InlineAsmTemplatePiece],
@@ -135,9 +135,6 @@ pub(crate) fn codegen_inline_asm<'tcx>(
135135
})
136136
.collect::<Vec<_>>();
137137

138-
let mut inputs = Vec::new();
139-
let mut outputs = Vec::new();
140-
141138
let mut asm_gen = InlineAssemblyGenerator {
142139
tcx: fx.tcx,
143140
arch: fx.tcx.sess.asm_arch.unwrap(),
@@ -165,6 +162,8 @@ pub(crate) fn codegen_inline_asm<'tcx>(
165162
let generated_asm = asm_gen.generate_asm_wrapper(&asm_name);
166163
fx.cx.global_asm.push_str(&generated_asm);
167164

165+
let mut inputs = Vec::new();
166+
let mut outputs = Vec::new();
168167
for (i, operand) in operands.iter().enumerate() {
169168
match operand {
170169
CInlineAsmOperand::In { reg: _, value } => {

0 commit comments

Comments
 (0)