diff options
| author | Wesley Wiser <wesleywiser@microsoft.com> | 2021-04-26 14:39:57 -0400 |
|---|---|---|
| committer | Wesley Wiser <wesleywiser@microsoft.com> | 2021-06-02 10:23:09 -0400 |
| commit | f353cbf1a145603e1f69c2aaaef171dd60ca4c65 (patch) | |
| tree | a1c3d4644264c06372c83a621fff2d50e152c070 /compiler/rustc_codegen_ssa/src | |
| parent | 1e13a9bb33debb931d603278b7f1a706b0d11660 (diff) | |
| download | rust-f353cbf1a145603e1f69c2aaaef171dd60ca4c65.tar.gz rust-f353cbf1a145603e1f69c2aaaef171dd60ca4c65.zip | |
Generate better debuginfo for directly tagged enums
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs index d1bbf74307c..626c71abf63 100644 --- a/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs +++ b/compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs @@ -45,8 +45,16 @@ pub fn push_debuginfo_type_name<'tcx>( ty::Float(float_ty) => output.push_str(float_ty.name_str()), ty::Foreign(def_id) => push_item_name(tcx, def_id, qualified, output), ty::Adt(def, substs) => { + if def.is_enum() && cpp_like_names { + output.push_str("_enum<"); + } + push_item_name(tcx, def.did, qualified, output); push_type_params(tcx, substs, output, visited); + + if def.is_enum() && cpp_like_names { + output.push('>'); + } } ty::Tuple(component_types) => { if cpp_like_names { |
