Files
rust/src/librustc_codegen_llvm
Mazdak Farrokhzad ae2551825d Rollup merge of #59380 - philipc:thinlto-variant, r=michaelwoerister
Fix invalid DWARF for enums when using ThinLTO

We were setting the same identifier for both the DW_TAG_structure_type
and the DW_TAG_variant_part. This becomes a problem when using ThinLTO
becauses it uses the identifier as a key for a map of types that is used
to delete duplicates based on the ODR, so one of them is deleted as a
duplicate, resulting in invalid DWARF.

The DW_TAG_variant_part isn't a standalone type, so it doesn't need
an identifier. Fix by omitting its identifier.

ODR uniquing is [enabled here](https://github.com/rust-lang/rust/blob/f21dee2c6179276321a88a63300dce74ff707e92/src/rustllvm/PassWrapper.cpp#L1101).
2019-03-30 14:14:53 +01:00
..
2019-03-29 17:17:13 +01:00
2019-03-29 17:17:13 +01:00
2018-12-25 21:08:33 -07:00
2019-02-18 03:58:58 +09:00
2019-03-29 17:17:13 +01:00
2019-02-18 03:58:58 +09:00
2018-12-25 21:08:33 -07:00
2019-02-18 03:58:58 +09:00
2019-02-18 03:58:58 +09:00
2018-11-26 15:03:13 -06:00
2019-02-18 03:58:58 +09:00
2019-03-19 17:07:09 +00:00

The codegen crate contains the code to convert from MIR into LLVM IR, and then from LLVM IR into machine code. In general it contains code that runs towards the end of the compilation process.

For more information about how codegen works, see the rustc guide.