about summary refs log tree commit diff
path: root/src/rustllvm/ArchiveWrapper.cpp
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-03-30 14:14:53 +0100
committerGitHub <noreply@github.com>2019-03-30 14:14:53 +0100
commitae2551825dbe5a688d00e1d1e7aa7dbaec274e50 (patch)
tree4df81cb1ef65b47a84456e6c9fb735765042b5bf /src/rustllvm/ArchiveWrapper.cpp
parentbe6b4c06be1481c0ade7ed683fc36b039166a8a1 (diff)
parent3a5a8a529a14271f5d8c21bec8746edfa93eec5f (diff)
downloadrust-ae2551825dbe5a688d00e1d1e7aa7dbaec274e50.tar.gz
rust-ae2551825dbe5a688d00e1d1e7aa7dbaec274e50.zip
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).
Diffstat (limited to 'src/rustllvm/ArchiveWrapper.cpp')
0 files changed, 0 insertions, 0 deletions