Add clif ir comment for write_cvalue
This commit is contained in:
parent
2920cc48e6
commit
c3daf6d220
@ -329,6 +329,7 @@ pub fn codegen_fn_prelude(fx: &mut FunctionCx<'_, '_, impl Backend>, start_ebb:
|
||||
.collect::<Vec<(Local, ArgKind, Ty)>>();
|
||||
|
||||
fx.bcx.switch_to_block(start_ebb);
|
||||
fx.bcx.ins().nop();
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
self::comments::add_locals_header_comment(fx);
|
||||
|
@ -346,6 +346,19 @@ impl<'tcx> CPlace<'tcx> {
|
||||
}
|
||||
|
||||
pub fn write_cvalue(self, fx: &mut FunctionCx<'_, 'tcx, impl Backend>, from: CValue<'tcx>) {
|
||||
#[cfg(debug_assertions)]
|
||||
{
|
||||
use cranelift_codegen::cursor::{Cursor, CursorPosition};
|
||||
let cur_ebb = match fx.bcx.cursor().position() {
|
||||
CursorPosition::After(ebb) => ebb,
|
||||
_ => unreachable!(),
|
||||
};
|
||||
fx.add_comment(
|
||||
fx.bcx.func.layout.last_inst(cur_ebb).unwrap(),
|
||||
format!("write_cvalue: {:?} <- {:?}",self, from),
|
||||
);
|
||||
}
|
||||
|
||||
let from_ty = from.layout().ty;
|
||||
let to_ty = self.layout().ty;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user