Skip to content

Commit

Permalink
Rollup merge of rust-lang#57840 - tromey:fix-issue-57762, r=nikic
Browse files Browse the repository at this point in the history
Fix issue 57762

against a stock LLVM 7.  LLVM 7 was released without a necessary fix
for a bug in the DWARF discriminant code.

This patch changes rustc to use the fallback mode on (non-Rust) LLVM 7.

Closes rust-lang#57762
  • Loading branch information
Centril authored Jan 23, 2019
2 parents d17f62d + 9452a8d commit ab998a2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/librustc_codegen_llvm/debuginfo/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,10 @@ fn use_enum_fallback(cx: &CodegenCx) -> bool {
// On MSVC we have to use the fallback mode, because LLVM doesn't
// lower variant parts to PDB.
return cx.sess().target.target.options.is_like_msvc
|| llvm_util::get_major_version() < 7;
// LLVM version 7 did not release with an important bug fix;
// but the required patch is in the LLVM 8. Rust LLVM reports
// 8 as well.
|| llvm_util::get_major_version() < 8;
}

// Describes the members of an enum value: An enum is described as a union of
Expand Down

0 comments on commit ab998a2

Please sign in to comment.