Function rustc_trans::trans::callee::trans_call_innerExperimental
[-]
[+]
[src]
pub fn trans_call_inner<'a, 'blk, 'tcx>(bcx: Block<'blk, 'tcx>, call_info: Option<NodeInfo>, callee_ty: Ty<'tcx>, get_callee: |bcx: Block<'blk, 'tcx>, arg_cleanup_scope: ScopeId| -> Callee<'blk, 'tcx>, args: CallArgs<'a, 'tcx>, dest: Option<Dest>) -> Result<'blk, 'tcx>
This behemoth of a function translates function calls. Unfortunately, in order to generate more efficient LLVM output at -O0, it has quite a complex signature (refactoring this into two functions seems like a good idea).
In particular, for lang items, it is invoked with a dest of None, and in that case the return value contains the result of the fn. The lang item must not return a structural type or else all heck breaks loose.
For non-lang items, dest is always Some, and hence the result
is written into memory somewhere. Nonetheless we return the
actual return value of the function.