Account for debuginfo on _0 without naming it.
This commit is contained in:
parent
e7b998c02a
commit
2adf2cd2f7
@ -241,11 +241,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||||||
pub fn debug_introduce_local(&self, bx: &mut Bx, local: mir::Local) {
|
pub fn debug_introduce_local(&self, bx: &mut Bx, local: mir::Local) {
|
||||||
let full_debug_info = bx.sess().opts.debuginfo == DebugInfo::Full;
|
let full_debug_info = bx.sess().opts.debuginfo == DebugInfo::Full;
|
||||||
|
|
||||||
// FIXME(eddyb) maybe name the return place as `_0` or `return`?
|
|
||||||
if local == mir::RETURN_PLACE {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let vars = match &self.per_local_var_debug_info {
|
let vars = match &self.per_local_var_debug_info {
|
||||||
Some(per_local) => &per_local[local],
|
Some(per_local) => &per_local[local],
|
||||||
None => return,
|
None => return,
|
||||||
@ -302,7 +297,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||||||
|
|
||||||
let local_ref = &self.locals[local];
|
let local_ref = &self.locals[local];
|
||||||
|
|
||||||
let name = if bx.sess().fewer_names() {
|
// FIXME Should the return place be named?
|
||||||
|
let name = if bx.sess().fewer_names() || local == mir::RETURN_PLACE {
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
Some(match whole_local_var.or(fallback_var.clone()) {
|
Some(match whole_local_var.or(fallback_var.clone()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user