diff options
Diffstat (limited to 'src/librustc_codegen_llvm/debuginfo')
| -rw-r--r-- | src/librustc_codegen_llvm/debuginfo/metadata.rs | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs index 82cd8589327..03bba7657bb 100644 --- a/src/librustc_codegen_llvm/debuginfo/metadata.rs +++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs @@ -16,7 +16,6 @@ use crate::llvm::debuginfo::{ DIArray, DICompositeType, DIDescriptor, DIFile, DIFlags, DILexicalBlock, DIScope, DIType, DebugEmissionKind, }; -use crate::llvm_util; use crate::value::Value; use log::debug; @@ -1289,22 +1288,11 @@ fn prepare_union_metadata( // Enums //=----------------------------------------------------------------------------- -/// DWARF variant support is only available starting in LLVM 8. -/// Although the earlier enum debug info output did not work properly -/// in all situations, it is better for the time being to continue to -/// sometimes emit the old style rather than emit something completely -/// useless when rust is compiled against LLVM 6 or older. LLVM 7 -/// contains an early version of the DWARF variant support, and will -/// crash when handling the new debug info format. This function -/// decides which representation will be emitted. +/// DWARF variant support is only available starting in LLVM 8, but +/// on MSVC we have to use the fallback mode, because LLVM doesn't +/// lower variant parts to PDB. 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. cx.sess().target.target.options.is_like_msvc - // 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 } // FIXME(eddyb) maybe precompute this? Right now it's computed once |
