diff options
| author | bors <bors@rust-lang.org> | 2023-03-16 19:59:56 +0000 | 
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-03-16 19:59:56 +0000 | 
| commit | 511364e7874dba9649a264100407e4bffe7b5425 (patch) | |
| tree | a898f628c25fbe57e67d622dc0888c23ed2d7430 /compiler/rustc_codegen_ssa/src | |
| parent | e386217dd996d293b3bde2285f6f5f4f502d7c17 (diff) | |
| parent | 2adf2cd2f743e13d79fd4669bd6f673023a243f2 (diff) | |
| download | rust-511364e7874dba9649a264100407e4bffe7b5425.tar.gz rust-511364e7874dba9649a264100407e4bffe7b5425.zip | |
Auto merge of #108944 - cjgillot:clear-local-info, r=oli-obk
Wrap the whole LocalInfo in ClearCrossCrate. MIR contains a lot of information about locals. The primary purpose of this information is the quality of borrowck diagnostics. This PR aims to drop this information after MIR analyses are finished, ie. starting from post-cleanup runtime MIR.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/debuginfo.rs | 9 | 
1 files changed, 2 insertions, 7 deletions
| diff --git a/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs b/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs index 708f3bc0c78..6e32c28a42c 100644 --- a/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs +++ b/compiler/rustc_codegen_ssa/src/mir/debuginfo.rs @@ -241,12 +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) { 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 && !self.mir.local_decls[mir::RETURN_PLACE].is_user_variable() - { - return; - } - let vars = match &self.per_local_var_debug_info { Some(per_local) => &per_local[local], None => return, @@ -303,7 +297,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { 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 } else { Some(match whole_local_var.or(fallback_var.clone()) { | 
