-pub fn trans_inline_asm<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, ia: &ast::InlineAsm)
- -> Block<'blk, 'tcx> {
- let fcx = bcx.fcx;
- let mut bcx = bcx;
- let mut constraints = Vec::new();
- let mut output_types = Vec::new();
-
- let temp_scope = fcx.push_custom_cleanup_scope();
-
- let take_datum = |mut bcx: Block<'blk, 'tcx>,
- arg_datum: Datum<'tcx, Expr>,
- llargs: &mut Vec<ValueRef>|
- -> Block<'blk, 'tcx> {
- // Make this an rvalue, since we are going to be
- // passing ownership.
- let arg_datum = unpack_datum!(
- bcx, arg_datum.to_rvalue_datum(bcx, "arg"));
-
- // Now that arg_datum is owned, get it into the appropriate
- // mode (ref vs value).
- let arg_datum = unpack_datum!(
- bcx, arg_datum.to_appropriate_datum(bcx));
-
- // Technically, ownership of val passes to the callee.
- // However, we must cleanup should we panic before the
- // callee is actually invoked.
- let val = arg_datum.add_clean(bcx.fcx,
- cleanup::CustomScope(temp_scope));
- llargs.push(val);
- bcx
- };
-
- let mut ext_inputs = Vec::new();
- let mut ext_constraints = Vec::new();
+pub fn trans_inline_asm<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
+ ia: &ast::InlineAsm,
+ outputs: Vec<Datum<'tcx, Lvalue>>,
+ mut inputs: Vec<ValueRef>) {
+ let mut ext_constraints = vec![];
+ let mut output_types = vec![];