Skip to content

Commit

Permalink
Simplify the version check
Browse files Browse the repository at this point in the history
Address the review comments by simplifying the version check to
just "< 8".
  • Loading branch information
tromey committed Jan 22, 2019
1 parent 1c95f5a commit 9452a8d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/librustc_codegen_llvm/debuginfo/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1164,11 +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 equivalent Rust LLVM.
// See https://github.com/rust-lang/rust/issues/57762.
|| (llvm_util::get_major_version() == 7 && unsafe { !llvm::LLVMRustIsRustLLVM() });
// 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 9452a8d

Please sign in to comment.