rust/compiler
Wesley Wiser 141546c355 Generate better debuginfo for niche-layout enums
Previously, we would generate a single struct with the layout of the
dataful variant plus an extra field whose name contained the value of
the niche (this would only really work for things like `Option<&_>`
where we can determine that the `None` case maps to `0` but for enums
that have multiple tag only variants, this doesn't work).

Now, we generate a union of two structs, one which is the layout of the
dataful variant and one which just has a way of reading the
discriminant. We also generate an enum which maps the discriminant value
to the tag only variants.

We also encode information about the range of values which correspond to
the dataful variant in the type name and then use natvis to determine
which union field we should display to the user.

As a result of this change, all niche-layout enums render correctly in
WinDbg and Visual Studio!
2021-06-02 10:23:10 -04:00
..
rustc use jemallocator in rustc/rustdoc 2021-04-04 14:10:26 -07:00
rustc_apfloat remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
rustc_arena Remove (lots of) dead code 2021-03-27 22:16:33 -04:00
rustc_ast Revert "Reduce the amount of untracked state in TyCtxt" 2021-06-01 09:05:22 +02:00
rustc_ast_lowering Rename take_trait_map. 2021-06-01 20:53:04 +02:00
rustc_ast_passes Stabilize extended_key_value_attributes 2021-05-18 01:01:36 -04:00
rustc_ast_pretty remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
rustc_attr remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
rustc_builtin_macros remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
rustc_codegen_cranelift Revert "Reduce the amount of untracked state in TyCtxt" 2021-06-01 09:05:22 +02:00
rustc_codegen_llvm Generate better debuginfo for niche-layout enums 2021-06-02 10:23:10 -04:00
rustc_codegen_ssa Generate better debuginfo for niche-layout enums 2021-06-02 10:23:10 -04:00
rustc_data_structures Auto merge of #85892 - tmiasko:i, r=oli-obk 2021-06-02 10:47:58 +00:00
rustc_driver Auto merge of #83842 - LeSeulArtichaut:thir-vec, r=nikomatsakis 2021-05-19 18:41:23 +00:00
rustc_error_codes swap function order for better read flow 2021-05-13 13:22:24 +02:00
rustc_errors Miscellaneous inlining improvements 2021-06-02 08:49:58 +02:00
rustc_expand Use correct edition when parsing :pat matchers 2021-05-29 13:09:14 -05:00
rustc_feature Auto merge of #85331 - cjgillot:dirty-dancing, r=Aaron1011 2021-06-01 23:02:52 +00:00
rustc_fs_util Optimize away a fs::metadata call. 2021-01-06 08:33:15 -08:00
rustc_graphviz Remove (lots of) dead code 2021-03-27 22:16:33 -04:00
rustc_hir Auto merge of #85892 - tmiasko:i, r=oli-obk 2021-06-02 10:47:58 +00:00
rustc_hir_pretty remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
rustc_incremental Auto merge of #85331 - cjgillot:dirty-dancing, r=Aaron1011 2021-06-01 23:02:52 +00:00
rustc_index Unify feature flags as step_trait 2021-05-26 18:07:10 -04:00
rustc_infer Revert "Reduce the amount of untracked state in TyCtxt" 2021-06-01 09:05:22 +02:00
rustc_interface Revert "Reduce the amount of untracked state in TyCtxt" 2021-06-01 09:05:22 +02:00
rustc_lexer Fix outdated crate names in compiler docs 2021-04-08 11:12:14 -05:00
rustc_lint Revert "Reduce the amount of untracked state in TyCtxt" 2021-06-01 09:05:22 +02:00
rustc_lint_defs Add additional migrations to handle auto-traits and clone traits 2021-05-06 14:17:59 -04:00
rustc_llvm Update cc 2021-05-24 23:34:12 +01:00
rustc_macros Use iter::zip in compiler/ 2021-03-26 09:32:31 -07:00
rustc_metadata Auto merge of #85908 - cjgillot:private-dep-query, r=Aaron1011 2021-06-02 08:06:45 +00:00
rustc_middle Auto merge of #85892 - tmiasko:i, r=oli-obk 2021-06-02 10:47:58 +00:00
rustc_mir Auto merge of #85829 - bjorn3:simplify_crate_num, r=jackh726 2021-06-01 20:09:03 +00:00
rustc_mir_build Auto merge of #83772 - jhpratt:revamp-step-trait, r=Mark-Simulacrum 2021-05-30 01:21:39 +00:00
rustc_parse Don't drop PResult without handling the error 2021-05-30 00:08:42 +02:00
rustc_parse_format remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
rustc_passes Revert "Reduce the amount of untracked state in TyCtxt" 2021-06-01 09:05:22 +02:00
rustc_plugin_impl Use () for plugin_registrar_fn. 2021-05-12 13:58:43 +02:00
rustc_privacy Revert "Reduce the amount of untracked state in TyCtxt" 2021-06-01 09:05:22 +02:00
rustc_query_impl Revert "Reduce the amount of untracked state in TyCtxt" 2021-06-01 09:05:22 +02:00
rustc_query_system Auto merge of #85319 - cjgillot:query-simp, r=Mark-Simulacrum 2021-05-30 10:11:23 +00:00
rustc_resolve Make trait_map an Option. 2021-06-01 21:59:48 +02:00
rustc_save_analysis Merge CrateDisambiguator into StableCrateId 2021-05-30 12:51:34 +02:00
rustc_serialize Auto merge of #83465 - michaelwoerister:safe-read_raw_bytes, r=cjgillot 2021-03-26 01:28:59 +00:00
rustc_session Miscellaneous inlining improvements 2021-06-02 08:49:58 +02:00
rustc_span Miscellaneous inlining improvements 2021-06-02 08:49:58 +02:00
rustc_symbol_mangling Revert "Reduce the amount of untracked state in TyCtxt" 2021-06-01 09:05:22 +02:00
rustc_target Miscellaneous inlining improvements 2021-06-02 08:49:58 +02:00
rustc_trait_selection Revert "Reduce the amount of untracked state in TyCtxt" 2021-06-01 09:05:22 +02:00
rustc_traits Auto merge of #83207 - oli-obk:valtree2, r=lcnr 2021-04-02 10:28:12 +00:00
rustc_ty_utils Revert "Reduce the amount of untracked state in TyCtxt" 2021-06-01 09:05:22 +02:00
rustc_type_ir Specialize implementations 2021-05-26 18:07:09 -04:00
rustc_typeck Revert "Reduce the amount of untracked state in TyCtxt" 2021-06-01 09:05:22 +02:00