debuginfo: Major code cleanup in debuginfo.rs
This commit is contained in:
parent
12d87d39c1
commit
a33d1b8f1d
|
@ -1142,7 +1142,7 @@ pub fn trans_stmt(cx: block, s: &ast::stmt) -> block {
|
||||||
bcx = init_local(bcx, *local);
|
bcx = init_local(bcx, *local);
|
||||||
if cx.sess().opts.extra_debuginfo
|
if cx.sess().opts.extra_debuginfo
|
||||||
&& fcx_has_nonzero_span(bcx.fcx) {
|
&& fcx_has_nonzero_span(bcx.fcx) {
|
||||||
debuginfo::create_local_var(bcx, *local);
|
debuginfo::create_local_var_metadata(bcx, *local);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ast::decl_item(i) => trans_item(cx.fcx.ccx, i)
|
ast::decl_item(i) => trans_item(cx.fcx.ccx, i)
|
||||||
|
@ -1774,7 +1774,7 @@ pub fn copy_args_to_allocas(fcx: fn_ctxt,
|
||||||
bcx = _match::store_arg(bcx, args[arg_n].pat, llarg);
|
bcx = _match::store_arg(bcx, args[arg_n].pat, llarg);
|
||||||
|
|
||||||
if fcx.ccx.sess.opts.extra_debuginfo && fcx_has_nonzero_span(fcx) {
|
if fcx.ccx.sess.opts.extra_debuginfo && fcx_has_nonzero_span(fcx) {
|
||||||
debuginfo::create_arg(bcx, &args[arg_n], args[arg_n].ty.span);
|
debuginfo::create_argument_metadata(bcx, &args[arg_n], args[arg_n].ty.span);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1948,7 +1948,7 @@ pub fn trans_fn(ccx: @mut CrateContext,
|
||||||
|fcx| {
|
|fcx| {
|
||||||
if ccx.sess.opts.extra_debuginfo
|
if ccx.sess.opts.extra_debuginfo
|
||||||
&& fcx_has_nonzero_span(fcx) {
|
&& fcx_has_nonzero_span(fcx) {
|
||||||
debuginfo::create_function(fcx);
|
debuginfo::create_function_metadata(fcx);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|_bcx| { });
|
|_bcx| { });
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue