Fix compiling in release mode
This commit is contained in:
parent
5b70fd6430
commit
f8c5e10f26
1 changed files with 13 additions and 4 deletions
17
src/abi.rs
17
src/abi.rs
|
@ -716,8 +716,14 @@ pub fn codegen_call_inner<'a, 'tcx: 'a>(
|
||||||
def: InstanceDef::Virtual(_, idx),
|
def: InstanceDef::Virtual(_, idx),
|
||||||
..
|
..
|
||||||
}) => {
|
}) => {
|
||||||
let nop_inst = fx.bcx.ins().nop();
|
#[cfg(debug_assertions)]
|
||||||
fx.add_comment(nop_inst, format!("virtual call; self arg pass mode: {:?}", get_pass_mode(fx.tcx, args[0].layout())));
|
{
|
||||||
|
let nop_inst = fx.bcx.ins().nop();
|
||||||
|
fx.add_comment(
|
||||||
|
nop_inst,
|
||||||
|
format!("virtual call; self arg pass mode: {:?}", get_pass_mode(fx.tcx, args[0].layout())),
|
||||||
|
);
|
||||||
|
}
|
||||||
let (ptr, method) = crate::vtable::get_ptr_and_method_ref(fx, args[0], idx);
|
let (ptr, method) = crate::vtable::get_ptr_and_method_ref(fx, args[0], idx);
|
||||||
(Some(method), Single(ptr), true)
|
(Some(method), Single(ptr), true)
|
||||||
}
|
}
|
||||||
|
@ -727,8 +733,11 @@ pub fn codegen_call_inner<'a, 'tcx: 'a>(
|
||||||
|
|
||||||
// Indirect call
|
// Indirect call
|
||||||
None => {
|
None => {
|
||||||
let nop_inst = fx.bcx.ins().nop();
|
#[cfg(debug_assertions)]
|
||||||
fx.add_comment(nop_inst, "indirect call");
|
{
|
||||||
|
let nop_inst = fx.bcx.ins().nop();
|
||||||
|
fx.add_comment(nop_inst, "indirect call");
|
||||||
|
}
|
||||||
let func = trans_operand(fx, func.expect("indirect call without func Operand"))
|
let func = trans_operand(fx, func.expect("indirect call without func Operand"))
|
||||||
.load_scalar(fx);
|
.load_scalar(fx);
|
||||||
(
|
(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue