about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/debuginfo/metadata.rs
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-01-22 11:44:23 -0700
committerTom Tromey <tom@tromey.com>2019-01-22 11:45:25 -0700
commit9452a8dfa3ba3575d5cf090a4e2305ee106d259e (patch)
treed32fbf3c98484d97ed3a694c0f249d2a2da3676b /src/librustc_codegen_llvm/debuginfo/metadata.rs
parent1c95f5a34c14f08d65cdd198827e3a2fcb63cf39 (diff)
downloadrust-9452a8dfa3ba3575d5cf090a4e2305ee106d259e.tar.gz
rust-9452a8dfa3ba3575d5cf090a4e2305ee106d259e.zip
Simplify the version check
Address the review comments by simplifying the version check to
just "< 8".
Diffstat (limited to 'src/librustc_codegen_llvm/debuginfo/metadata.rs')
-rw-r--r--src/librustc_codegen_llvm/debuginfo/metadata.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs
index a354eef6887..9f63038c362 100644
--- a/src/librustc_codegen_llvm/debuginfo/metadata.rs
+++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs
@@ -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