Skip to content

Commit 676ade5

Browse files
tromeypietroalbini
authored andcommitted
Simplify the version check
Address the review comments by simplifying the version check to just "< 8".
1 parent dc52f0f commit 676ade5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/librustc_codegen_llvm/debuginfo/metadata.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -1164,11 +1164,10 @@ fn use_enum_fallback(cx: &CodegenCx) -> bool {
11641164
// On MSVC we have to use the fallback mode, because LLVM doesn't
11651165
// lower variant parts to PDB.
11661166
return cx.sess().target.target.options.is_like_msvc
1167-
|| llvm_util::get_major_version() < 7
11681167
// LLVM version 7 did not release with an important bug fix;
1169-
// but the required patch is in the equivalent Rust LLVM.
1170-
// See https://github.com/rust-lang/rust/issues/57762.
1171-
|| (llvm_util::get_major_version() == 7 && unsafe { !llvm::LLVMRustIsRustLLVM() });
1168+
// but the required patch is in the LLVM 8. Rust LLVM reports
1169+
// 8 as well.
1170+
|| llvm_util::get_major_version() < 8;
11721171
}
11731172

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

0 commit comments

Comments
 (0)