rust/compiler/rustc_codegen_ssa/src
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
..
back Revert "Reduce the amount of untracked state in TyCtxt" 2021-06-01 09:05:22 +02:00
coverageinfo coverageinfo query needs to use the same MIR as codegen 2021-05-12 20:27:07 -07:00
debuginfo Generate better debuginfo for niche-layout enums 2021-06-02 10:23:10 -04:00
mir rustc_codegen_ssa: append blocks to functions w/o creating a builder. 2021-05-17 00:04:09 +03:00
traits rustc_codegen_ssa: append blocks to functions w/o creating a builder. 2021-05-17 00:04:09 +03:00
base.rs Revert "Reduce the amount of untracked state in TyCtxt" 2021-06-01 09:05:22 +02:00
common.rs Remove support for floating-point constants in asm! 2021-05-14 14:58:21 +01:00
glue.rs Change ty.kind to a method 2020-09-04 17:47:51 +02:00
lib.rs remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
meth.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
mono_item.rs Add support for const operands and options to global_asm! 2021-05-13 22:31:57 +01:00
target_features.rs Ensure all crypto components (AES, PMULL, SHA1/2) are available on arm/aarch64 2021-05-19 16:13:23 +01:00