diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2020-07-11 08:53:13 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-11 08:53:13 -0700 |
| commit | 084ac77cf29e786df7251392bed0b6e6c7ea8786 (patch) | |
| tree | 15255db5e83787345ba5062ead32274a4786c51e /src/librustc_codegen_ssa | |
| parent | 90f1d724c8d9b364b4b0c81817484afa04c73009 (diff) | |
| parent | 24a728a8eb4832568509eb757c2374934a76cb98 (diff) | |
Rollup merge of #73715 - MaulingMonkey:pr-natvis-tuples, r=Amanieu
debuginfo: Mangle tuples to be natvis friendly, typedef basic types These changes are meant to unblock rust-lang/rust#70052 "Update hashbrown to 0.8.0" by allowing the use of `tuple<u64, u64>` as a .natvis expression in MSVC style debuggers (MSVC, WinDbg, CDB, etc.) * f8eb81b does the actual mangling of `(u64, u64)` -> `tuple<u64, 64>` * 24a728a allows `u64` to resolve (fixing `$T1` / `$T2` when used to visualize `HashMap<u64, u64, ...>`)
Diffstat (limited to 'src/librustc_codegen_ssa')
| -rw-r--r-- | src/librustc_codegen_ssa/debuginfo/type_names.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/librustc_codegen_ssa/debuginfo/type_names.rs b/src/librustc_codegen_ssa/debuginfo/type_names.rs index a64489c04c8..20d440433cb 100644 --- a/src/librustc_codegen_ssa/debuginfo/type_names.rs +++ b/src/librustc_codegen_ssa/debuginfo/type_names.rs @@ -47,7 +47,12 @@ pub fn push_debuginfo_type_name<'tcx>( push_type_params(tcx, substs, output, visited); } ty::Tuple(component_types) => { - output.push('('); + if cpp_like_names { + output.push_str("tuple<"); + } else { + output.push('('); + } + for component_type in component_types { push_debuginfo_type_name(tcx, component_type.expect_ty(), true, output, visited); output.push_str(", "); @@ -56,7 +61,12 @@ pub fn push_debuginfo_type_name<'tcx>( output.pop(); output.pop(); } - output.push(')'); + + if cpp_like_names { + output.push('>'); + } else { + output.push(')'); + } } ty::RawPtr(ty::TypeAndMut { ty: inner_type, mutbl }) => { if !cpp_like_names { |
