MIR: Make Mir take ownership of InlineAsm values.

This commit is contained in:
Michael Woerister 2015-12-10 16:39:17 -05:00
parent 33d29700b3
commit 70398d5ad0
3 changed files with 3 additions and 3 deletions

View File

@ -584,7 +584,7 @@ pub enum Rvalue<'tcx> {
from_end: usize,
},
InlineAsm(&'tcx InlineAsm),
InlineAsm(InlineAsm),
}
#[derive(Clone, Debug, PartialEq, Eq)]

View File

@ -40,7 +40,7 @@ fn expr_as_rvalue(&mut self,
this.in_scope(extent, block, |this| this.as_rvalue(block, value))
}
ExprKind::InlineAsm { asm } => {
block.and(Rvalue::InlineAsm(asm))
block.and(Rvalue::InlineAsm(asm.clone()))
}
ExprKind::Repeat { value, count } => {
let value_operand = unpack!(block = this.as_operand(block, value));

View File

@ -120,7 +120,7 @@ pub fn trans_rvalue(&mut self,
bcx
}
mir::Rvalue::InlineAsm(inline_asm) => {
mir::Rvalue::InlineAsm(ref inline_asm) => {
asm::trans_inline_asm(bcx, inline_asm)
}