rust/compiler/rustc_codegen_ssa/src
Dylan DPC f79be2c6de
Rollup merge of #81898 - nanguye2496:nanguye2496/fix_str_and_slice_visualization, r=varkor
Fix debug information for function arguments of type &str or slice.

Issue details:
When lowering MIR to LLVM IR, the compiler decomposes every &str and slice argument into a data pointer and a usize. Then, the original argument is reconstructed from the pointer and the usize arguments in the body of the function that owns it. Since the original argument is declared in the body of a function, it should be marked as a LocalVariable instead of an ArgumentVairable. This confusion causes MSVC debuggers unable to visualize &str and slice arguments correctly. (See https://github.com/rust-lang/rust/issues/81894 for more details).

Fix details:
Making sure that the debug variable for every &str and slice argument is marked as LocalVariable instead of ArgumentVariable in computing_per_local_var_debug_info. This change has been verified on VS Code debugger, VS debugger, WinDbg and LLDB.
2021-02-17 23:51:17 +01:00
..
back Don't fail to remove files if they are missing 2021-02-14 18:31:57 +02:00
coverageinfo remove redundant closures (clippy::redundant_closure) 2021-01-03 13:34:24 +01:00
debuginfo Stop adding '*' at the end of type names for Ref and Slice when computing debug info for MSVC debuggers 2020-11-30 14:31:34 -08:00
mir Rollup merge of #81898 - nanguye2496:nanguye2496/fix_str_and_slice_visualization, r=varkor 2021-02-17 23:51:17 +01:00
traits cg_ssa: introduce TargetMachineFactoryFn alias 2020-12-16 10:33:43 +00:00
base.rs rustc_codegen_ssa: tune codegen scheduling to reduce memory usage 2021-02-03 18:55:05 -08:00
common.rs Remove unused #[allow(...)] statements from compiler/ 2020-09-26 01:25:55 +02:00
glue.rs Change ty.kind to a method 2020-09-04 17:47:51 +02:00
lib.rs Don't provide backend_optimization_level query for extern crates 2021-01-23 11:11:51 +01:00
meth.rs
mono_item.rs Use an ItemId inside mir::GlobalAsm. 2021-02-15 19:24:58 +01:00
target_features.rs Rollup merge of #78361 - DevJPM:master, r=workingjubilee 2020-11-18 15:46:19 +01:00