mir: Store immediates used for indirect arguments in an alloca.
This commit is contained in:
parent
473f804491
commit
460e66457a
1 changed files with 1 additions and 1 deletions
|
|
@ -410,7 +410,7 @@ impl<'bcx, 'tcx> MirContext<'bcx, 'tcx> {
|
|||
|
||||
// Force by-ref if we have to load through a cast pointer.
|
||||
let (mut llval, by_ref) = match val {
|
||||
Immediate(llval) if arg.cast.is_some() => {
|
||||
Immediate(llval) if arg.is_indirect() || arg.cast.is_some() => {
|
||||
let llscratch = build::AllocaFcx(bcx.fcx(), arg.original_ty, "arg");
|
||||
bcx.store(llval, llscratch);
|
||||
(llscratch, true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue