From 8506bb006040cf8e8cb004202706c81e62ddacee Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 14 Apr 2020 12:10:58 -0700 Subject: [PATCH] Update the minimum external LLVM to 8 LLVM 8 was released on March 20, 2019, over a year ago. --- .github/workflows/ci.yml | 8 +-- src/bootstrap/native.rs | 4 +- src/ci/azure-pipelines/auto.yml | 2 +- src/ci/azure-pipelines/pr.yml | 2 +- .../Dockerfile | 4 +- src/ci/github-actions/ci.yml | 8 +-- src/librustc_codegen_llvm/attributes.rs | 21 +++----- .../debuginfo/metadata.rs | 18 ++----- src/librustc_codegen_llvm/intrinsic.rs | 51 ++++--------------- src/librustc_codegen_llvm/llvm_util.rs | 20 ++++---- src/rustllvm/PassWrapper.cpp | 22 +------- src/rustllvm/RustWrapper.cpp | 25 --------- src/test/codegen/enum-debug-clike.rs | 13 ++--- src/test/codegen/enum-debug-niche-2.rs | 8 ++- src/test/codegen/enum-debug-niche.rs | 8 ++- src/test/codegen/enum-debug-tagged.rs | 8 ++- src/test/codegen/force-frame-pointers.rs | 1 - src/test/codegen/instrument-mcount.rs | 1 - src/test/debuginfo/borrowed-enum.rs | 3 +- src/test/debuginfo/enum-thinlto.rs | 3 +- src/test/debuginfo/generator-objects.rs | 3 +- .../generic-enum-with-different-disr-sizes.rs | 3 +- .../debuginfo/generic-struct-style-enum.rs | 3 +- .../debuginfo/generic-tuple-style-enum.rs | 4 +- src/test/debuginfo/issue-57822.rs | 3 +- src/test/debuginfo/recursive-struct.rs | 3 +- src/test/debuginfo/struct-style-enum.rs | 4 +- src/test/debuginfo/tuple-style-enum.rs | 4 +- src/test/debuginfo/unique-enum.rs | 4 +- ...intrinsic-generic-arithmetic-saturating.rs | 1 - 30 files changed, 67 insertions(+), 195 deletions(-) rename src/ci/docker/{x86_64-gnu-llvm-7 => x86_64-gnu-llvm-8}/Dockerfile (97%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd3da15a21bbb..958d9b67bdf9b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,13 +36,13 @@ jobs: matrix: name: - mingw-check - - x86_64-gnu-llvm-7 + - x86_64-gnu-llvm-8 - x86_64-gnu-tools include: - name: mingw-check os: ubuntu-latest-xl env: {} - - name: x86_64-gnu-llvm-7 + - name: x86_64-gnu-llvm-8 os: ubuntu-latest-xl env: {} - name: x86_64-gnu-tools @@ -352,7 +352,7 @@ jobs: - x86_64-gnu-debug - x86_64-gnu-distcheck - x86_64-gnu-full-bootstrap - - x86_64-gnu-llvm-7 + - x86_64-gnu-llvm-8 - x86_64-gnu-nopt - x86_64-gnu-tools - x86_64-mingw-1 @@ -469,7 +469,7 @@ jobs: - name: x86_64-gnu-full-bootstrap os: ubuntu-latest-xl env: {} - - name: x86_64-gnu-llvm-7 + - name: x86_64-gnu-llvm-8 env: RUST_BACKTRACE: 1 os: ubuntu-latest-xl diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index 1e380a20629da..0c87695ff7cae 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -289,11 +289,11 @@ fn check_llvm_version(builder: &Builder<'_>, llvm_config: &Path) { let version = output(cmd.arg("--version")); let mut parts = version.split('.').take(2).filter_map(|s| s.parse::().ok()); if let (Some(major), Some(_minor)) = (parts.next(), parts.next()) { - if major >= 7 { + if major >= 8 { return; } } - panic!("\n\nbad LLVM version: {}, need >=7.0\n\n", version) + panic!("\n\nbad LLVM version: {}, need >=8.0\n\n", version) } fn configure_cmake( diff --git a/src/ci/azure-pipelines/auto.yml b/src/ci/azure-pipelines/auto.yml index 56fe3864204c6..46d3cf7a38ca2 100644 --- a/src/ci/azure-pipelines/auto.yml +++ b/src/ci/azure-pipelines/auto.yml @@ -29,7 +29,7 @@ jobs: - template: steps/run.yml strategy: matrix: - x86_64-gnu-llvm-7: + x86_64-gnu-llvm-8: RUST_BACKTRACE: 1 dist-x86_64-linux: {} dist-x86_64-linux-alt: diff --git a/src/ci/azure-pipelines/pr.yml b/src/ci/azure-pipelines/pr.yml index 37c1779b7995b..1fc8d187242f8 100644 --- a/src/ci/azure-pipelines/pr.yml +++ b/src/ci/azure-pipelines/pr.yml @@ -29,7 +29,7 @@ jobs: - template: steps/run.yml strategy: matrix: - x86_64-gnu-llvm-7: {} + x86_64-gnu-llvm-8: {} mingw-check: {} x86_64-gnu-tools: CI_ONLY_WHEN_SUBMODULES_CHANGED: 1 diff --git a/src/ci/docker/x86_64-gnu-llvm-7/Dockerfile b/src/ci/docker/x86_64-gnu-llvm-8/Dockerfile similarity index 97% rename from src/ci/docker/x86_64-gnu-llvm-7/Dockerfile rename to src/ci/docker/x86_64-gnu-llvm-8/Dockerfile index f70c3de2ece83..58fdc6f262376 100644 --- a/src/ci/docker/x86_64-gnu-llvm-7/Dockerfile +++ b/src/ci/docker/x86_64-gnu-llvm-8/Dockerfile @@ -12,7 +12,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ cmake \ sudo \ gdb \ - llvm-7-tools \ + llvm-8-tools \ libedit-dev \ libssl-dev \ pkg-config \ @@ -26,7 +26,7 @@ RUN sh /scripts/sccache.sh # using llvm-link-shared due to libffi issues -- see #34486 ENV RUST_CONFIGURE_ARGS \ --build=x86_64-unknown-linux-gnu \ - --llvm-root=/usr/lib/llvm-7 \ + --llvm-root=/usr/lib/llvm-8 \ --enable-llvm-link-shared \ --set rust.thin-lto-import-instr-limit=10 diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index 813c35cb9d502..df1467ea73a12 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -259,13 +259,13 @@ jobs: matrix: name: - mingw-check - - x86_64-gnu-llvm-7 + - x86_64-gnu-llvm-8 - x86_64-gnu-tools include: - name: mingw-check <<: *job-linux-xl - - name: x86_64-gnu-llvm-7 + - name: x86_64-gnu-llvm-8 <<: *job-linux-xl - name: x86_64-gnu-tools @@ -349,7 +349,7 @@ jobs: - x86_64-gnu-debug - x86_64-gnu-distcheck - x86_64-gnu-full-bootstrap - - x86_64-gnu-llvm-7 + - x86_64-gnu-llvm-8 - x86_64-gnu-nopt - x86_64-gnu-tools - x86_64-mingw-1 @@ -471,7 +471,7 @@ jobs: - name: x86_64-gnu-full-bootstrap <<: *job-linux-xl - - name: x86_64-gnu-llvm-7 + - name: x86_64-gnu-llvm-8 env: RUST_BACKTRACE: 1 <<: *job-linux-xl diff --git a/src/librustc_codegen_llvm/attributes.rs b/src/librustc_codegen_llvm/attributes.rs index 784a3a87e9885..004de8d8ca9a8 100644 --- a/src/librustc_codegen_llvm/attributes.rs +++ b/src/librustc_codegen_llvm/attributes.rs @@ -82,21 +82,12 @@ fn naked(val: &'ll Value, is_naked: bool) { pub fn set_frame_pointer_elimination(cx: &CodegenCx<'ll, '_>, llfn: &'ll Value) { if cx.sess().must_not_eliminate_frame_pointers() { - if llvm_util::get_major_version() >= 8 { - llvm::AddFunctionAttrStringValue( - llfn, - llvm::AttributePlace::Function, - const_cstr!("frame-pointer"), - const_cstr!("all"), - ); - } else { - llvm::AddFunctionAttrStringValue( - llfn, - llvm::AttributePlace::Function, - const_cstr!("no-frame-pointer-elim"), - const_cstr!("true"), - ); - } + llvm::AddFunctionAttrStringValue( + llfn, + llvm::AttributePlace::Function, + const_cstr!("frame-pointer"), + const_cstr!("all"), + ); } } diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs index 82cd858932747..03bba7657bb6d 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 diff --git a/src/librustc_codegen_llvm/intrinsic.rs b/src/librustc_codegen_llvm/intrinsic.rs index 63730c56f0ed2..86d10e91d6de4 100644 --- a/src/librustc_codegen_llvm/intrinsic.rs +++ b/src/librustc_codegen_llvm/intrinsic.rs @@ -2,7 +2,6 @@ use crate::abi::{Abi, FnAbi, LlvmType, PassMode}; use crate::builder::Builder; use crate::context::CodegenCx; use crate::llvm; -use crate::llvm_util; use crate::type_::Type; use crate::type_of::LayoutLlvmExt; use crate::va_arg::emit_va_arg; @@ -11,7 +10,7 @@ use crate::value::Value; use rustc_ast::ast; use rustc_codegen_ssa::base::{compare_simd_types, to_immediate, wants_msvc_seh}; use rustc_codegen_ssa::common::span_invalid_monomorphization_error; -use rustc_codegen_ssa::common::{IntPredicate, TypeKind}; +use rustc_codegen_ssa::common::TypeKind; use rustc_codegen_ssa::glue; use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue}; use rustc_codegen_ssa::mir::place::PlaceRef; @@ -461,46 +460,14 @@ impl IntrinsicCallMethods<'tcx> for Builder<'a, 'll, 'tcx> { let is_add = name == "saturating_add"; let lhs = args[0].immediate(); let rhs = args[1].immediate(); - if llvm_util::get_major_version() >= 8 { - let llvm_name = &format!( - "llvm.{}{}.sat.i{}", - if signed { 's' } else { 'u' }, - if is_add { "add" } else { "sub" }, - width - ); - let llfn = self.get_intrinsic(llvm_name); - self.call(llfn, &[lhs, rhs], None) - } else { - let llvm_name = &format!( - "llvm.{}{}.with.overflow.i{}", - if signed { 's' } else { 'u' }, - if is_add { "add" } else { "sub" }, - width - ); - let llfn = self.get_intrinsic(llvm_name); - let pair = self.call(llfn, &[lhs, rhs], None); - let val = self.extract_value(pair, 0); - let overflow = self.extract_value(pair, 1); - let llty = self.type_ix(width); - - let limit = if signed { - let limit_lo = self - .const_uint_big(llty, (i128::MIN >> (128 - width)) as u128); - let limit_hi = self - .const_uint_big(llty, (i128::MAX >> (128 - width)) as u128); - let neg = self.icmp( - IntPredicate::IntSLT, - val, - self.const_uint(llty, 0), - ); - self.select(neg, limit_hi, limit_lo) - } else if is_add { - self.const_uint_big(llty, u128::MAX >> (128 - width)) - } else { - self.const_uint(llty, 0) - }; - self.select(overflow, limit, val) - } + let llvm_name = &format!( + "llvm.{}{}.sat.i{}", + if signed { 's' } else { 'u' }, + if is_add { "add" } else { "sub" }, + width + ); + let llfn = self.get_intrinsic(llvm_name); + self.call(llfn, &[lhs, rhs], None) } _ => bug!(), }, diff --git a/src/librustc_codegen_llvm/llvm_util.rs b/src/librustc_codegen_llvm/llvm_util.rs index a56c8802f3c00..6f16b0fb79c39 100644 --- a/src/librustc_codegen_llvm/llvm_util.rs +++ b/src/librustc_codegen_llvm/llvm_util.rs @@ -83,17 +83,15 @@ unsafe fn configure_llvm(sess: &Session) { if !sess.opts.debugging_opts.no_generate_arange_section { add("-generate-arange-section", false); } - if get_major_version() >= 8 { - match sess - .opts - .debugging_opts - .merge_functions - .unwrap_or(sess.target.target.options.merge_functions) - { - MergeFunctions::Disabled | MergeFunctions::Trampolines => {} - MergeFunctions::Aliases => { - add("-mergefunc-use-aliases", false); - } + match sess + .opts + .debugging_opts + .merge_functions + .unwrap_or(sess.target.target.options.merge_functions) + { + MergeFunctions::Disabled | MergeFunctions::Trampolines => {} + MergeFunctions::Aliases => { + add("-mergefunc-use-aliases", false); } } diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp index 9e8614e3b6d34..b221c17b422f5 100644 --- a/src/rustllvm/PassWrapper.cpp +++ b/src/rustllvm/PassWrapper.cpp @@ -33,10 +33,8 @@ #include "llvm/Transforms/Instrumentation/AddressSanitizer.h" #include "llvm/Support/TimeProfiler.h" #endif -#if LLVM_VERSION_GE(8, 0) #include "llvm/Transforms/Instrumentation/ThreadSanitizer.h" #include "llvm/Transforms/Instrumentation/MemorySanitizer.h" -#endif #if LLVM_VERSION_GE(9, 0) #include "llvm/Transforms/Utils/CanonicalizeAliases.h" #endif @@ -138,19 +136,13 @@ extern "C" LLVMPassRef LLVMRustCreateMemorySanitizerPass(int TrackOrigins, bool return wrap(createMemorySanitizerLegacyPassPass( MemorySanitizerOptions{TrackOrigins, Recover, CompileKernel})); -#elif LLVM_VERSION_GE(8, 0) - return wrap(createMemorySanitizerLegacyPassPass(TrackOrigins, Recover)); #else - return wrap(createMemorySanitizerPass(TrackOrigins, Recover)); + return wrap(createMemorySanitizerLegacyPassPass(TrackOrigins, Recover)); #endif } extern "C" LLVMPassRef LLVMRustCreateThreadSanitizerPass() { -#if LLVM_VERSION_GE(8, 0) return wrap(createThreadSanitizerLegacyPassPass()); -#else - return wrap(createThreadSanitizerPass()); -#endif } extern "C" LLVMRustPassKind LLVMRustPassKind(LLVMPassRef RustPass) { @@ -1236,15 +1228,11 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules, auto deadIsPrevailing = [&](GlobalValue::GUID G) { return PrevailingType::Unknown; }; -#if LLVM_VERSION_GE(8, 0) // We don't have a complete picture in our use of ThinLTO, just our immediate // crate, so we need `ImportEnabled = false` to limit internalization. // Otherwise, we sometimes lose `static` values -- see #60184. computeDeadSymbolsWithConstProp(Ret->Index, Ret->GUIDPreservedSymbols, deadIsPrevailing, /* ImportEnabled = */ false); -#else - computeDeadSymbols(Ret->Index, Ret->GUIDPreservedSymbols, deadIsPrevailing); -#endif ComputeCrossModuleImport( Ret->Index, Ret->ModuleToDefinedGVSummaries, @@ -1277,10 +1265,8 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules, #if LLVM_VERSION_GE(9, 0) thinLTOResolvePrevailingInIndex(Ret->Index, isPrevailing, recordNewLinkage, Ret->GUIDPreservedSymbols); -#elif LLVM_VERSION_GE(8, 0) - thinLTOResolvePrevailingInIndex(Ret->Index, isPrevailing, recordNewLinkage); #else - thinLTOResolveWeakForLinkerInIndex(Ret->Index, isPrevailing, recordNewLinkage); + thinLTOResolvePrevailingInIndex(Ret->Index, isPrevailing, recordNewLinkage); #endif // Here we calculate an `ExportedGUIDs` set for use in the `isExported` @@ -1346,11 +1332,7 @@ extern "C" bool LLVMRustPrepareThinLTOResolveWeak(const LLVMRustThinLTOData *Data, LLVMModuleRef M) { Module &Mod = *unwrap(M); const auto &DefinedGlobals = Data->ModuleToDefinedGVSummaries.lookup(Mod.getModuleIdentifier()); -#if LLVM_VERSION_GE(8, 0) thinLTOResolvePrevailingInModule(Mod, DefinedGlobals); -#else - thinLTOResolveWeakForLinkerModule(Mod, DefinedGlobals); -#endif return true; } diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index 21094b3252089..28efc8bf5dd54 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -586,7 +586,6 @@ inline LLVMRustDISPFlags virtuality(LLVMRustDISPFlags F) { return static_cast(static_cast(F) & 0x3); } -#if LLVM_VERSION_GE(8, 0) static DISubprogram::DISPFlags fromRust(LLVMRustDISPFlags SPFlags) { DISubprogram::DISPFlags Result = DISubprogram::DISPFlags::SPFlagZero; @@ -619,7 +618,6 @@ static DISubprogram::DISPFlags fromRust(LLVMRustDISPFlags SPFlags) { return Result; } -#endif enum class LLVMRustDebugEmissionKind { NoDebug, @@ -734,7 +732,6 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateFunction( LLVMMetadataRef Decl) { DITemplateParameterArray TParams = DITemplateParameterArray(unwrap(TParam)); -#if LLVM_VERSION_GE(8, 0) DISubprogram::DISPFlags llvmSPFlags = fromRust(SPFlags); DINode::DIFlags llvmFlags = fromRust(Flags); #if LLVM_VERSION_LT(9, 0) @@ -748,22 +745,6 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateFunction( unwrapDI(File), LineNo, unwrapDI(Ty), ScopeLine, llvmFlags, llvmSPFlags, TParams, unwrapDIPtr(Decl)); -#else - bool IsLocalToUnit = isSet(SPFlags & LLVMRustDISPFlags::SPFlagLocalToUnit); - bool IsDefinition = isSet(SPFlags & LLVMRustDISPFlags::SPFlagDefinition); - bool IsOptimized = isSet(SPFlags & LLVMRustDISPFlags::SPFlagOptimized); - DINode::DIFlags llvmFlags = fromRust(Flags); - if (isSet(SPFlags & LLVMRustDISPFlags::SPFlagMainSubprogram)) - llvmFlags |= DINode::DIFlags::FlagMainSubprogram; - DISubprogram *Sub = Builder->createFunction( - unwrapDI(Scope), - StringRef(Name, NameLen), - StringRef(LinkageName, LinkageNameLen), - unwrapDI(File), LineNo, - unwrapDI(Ty), IsLocalToUnit, IsDefinition, - ScopeLine, llvmFlags, IsOptimized, TParams, - unwrapDIPtr(Decl)); -#endif unwrap(Fn)->setSubprogram(Sub); return wrap(Sub); } @@ -884,9 +865,7 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateStaticVariable( /* isDefined */ true, #endif InitExpr, unwrapDIPtr(Decl), -#if LLVM_VERSION_GE(8, 0) /* templateParams */ nullptr, -#endif AlignInBits); InitVal->setMetadata("dbg", VarExpr); @@ -1107,11 +1086,7 @@ extern "C" void LLVMRustUnpackOptimizationDiagnostic( if (loc.isValid()) { *Line = loc.getLine(); *Column = loc.getColumn(); -#if LLVM_VERSION_GE(8, 0) FilenameOS << loc.getAbsolutePath(); -#else - FilenameOS << loc.getFilename(); -#endif } RawRustStringOstream MessageOS(MessageOut); diff --git a/src/test/codegen/enum-debug-clike.rs b/src/test/codegen/enum-debug-clike.rs index f268c8bcbccdb..134443931e986 100644 --- a/src/test/codegen/enum-debug-clike.rs +++ b/src/test/codegen/enum-debug-clike.rs @@ -1,18 +1,13 @@ -// This test depends on a patch that was committed to upstream LLVM -// before 7.0, then backported to the Rust LLVM fork. It tests that -// debug info for "c-like" enums is properly emitted. +// This tests that debug info for "c-like" enums is properly emitted. +// This is ignored for the fallback mode on MSVC due to problems with PDB. // ignore-tidy-linelength -// ignore-windows -// min-system-llvm-version 8.0 +// ignore-msvc // compile-flags: -g -C no-prepopulate-passes -// DIFlagFixedEnum was deprecated in 8.0, renamed to DIFlagEnumClass. -// We match either for compatibility. - // CHECK-LABEL: @main -// CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_enumeration_type,{{.*}}name: "E",{{.*}}flags: {{(DIFlagEnumClass|DIFlagFixedEnum)}},{{.*}} +// CHECK: {{.*}}DICompositeType{{.*}}tag: DW_TAG_enumeration_type,{{.*}}name: "E",{{.*}}flags: DIFlagEnumClass,{{.*}} // CHECK: {{.*}}DIEnumerator{{.*}}name: "A",{{.*}}value: {{[0-9].*}} // CHECK: {{.*}}DIEnumerator{{.*}}name: "B",{{.*}}value: {{[0-9].*}} // CHECK: {{.*}}DIEnumerator{{.*}}name: "C",{{.*}}value: {{[0-9].*}} diff --git a/src/test/codegen/enum-debug-niche-2.rs b/src/test/codegen/enum-debug-niche-2.rs index 0f17976ef4965..0f78234d9774d 100644 --- a/src/test/codegen/enum-debug-niche-2.rs +++ b/src/test/codegen/enum-debug-niche-2.rs @@ -1,10 +1,8 @@ -// This test depends on a patch that was committed to upstream LLVM -// before 7.0, then backported to the Rust LLVM fork. It tests that -// optimized enum debug info accurately reflects the enum layout. +// This tests that optimized enum debug info accurately reflects the enum layout. +// This is ignored for the fallback mode on MSVC due to problems with PDB. // ignore-tidy-linelength -// ignore-windows -// min-system-llvm-version 8.0 +// ignore-msvc // compile-flags: -g -C no-prepopulate-passes diff --git a/src/test/codegen/enum-debug-niche.rs b/src/test/codegen/enum-debug-niche.rs index 2272488375fdd..b718a6854dd7e 100644 --- a/src/test/codegen/enum-debug-niche.rs +++ b/src/test/codegen/enum-debug-niche.rs @@ -1,9 +1,7 @@ -// This test depends on a patch that was committed to upstream LLVM -// before 7.0, then backported to the Rust LLVM fork. It tests that -// optimized enum debug info accurately reflects the enum layout. +// This tests that optimized enum debug info accurately reflects the enum layout. +// This is ignored for the fallback mode on MSVC due to problems with PDB. -// ignore-windows -// min-system-llvm-version 8.0 +// ignore-msvc // compile-flags: -g -C no-prepopulate-passes diff --git a/src/test/codegen/enum-debug-tagged.rs b/src/test/codegen/enum-debug-tagged.rs index 3539aae42eae7..095c49ac3acb9 100644 --- a/src/test/codegen/enum-debug-tagged.rs +++ b/src/test/codegen/enum-debug-tagged.rs @@ -1,9 +1,7 @@ -// This test depends on a patch that was committed to upstream LLVM -// before 7.0, then backported to the Rust LLVM fork. It tests that -// debug info for tagged (ordinary) enums is properly emitted. +// This tests that debug info for tagged (ordinary) enums is properly emitted. +// This is ignored for the fallback mode on MSVC due to problems with PDB. -// ignore-windows -// min-system-llvm-version 8.0 +// ignore-msvc // compile-flags: -g -C no-prepopulate-passes diff --git a/src/test/codegen/force-frame-pointers.rs b/src/test/codegen/force-frame-pointers.rs index 4c94a601f33fd..637c4234654b4 100644 --- a/src/test/codegen/force-frame-pointers.rs +++ b/src/test/codegen/force-frame-pointers.rs @@ -1,4 +1,3 @@ -// min-llvm-version 8.0 // compile-flags: -C no-prepopulate-passes -C force-frame-pointers=y #![crate_type="lib"] diff --git a/src/test/codegen/instrument-mcount.rs b/src/test/codegen/instrument-mcount.rs index e4e6d5ca2b850..518a2a0da2a84 100644 --- a/src/test/codegen/instrument-mcount.rs +++ b/src/test/codegen/instrument-mcount.rs @@ -1,4 +1,3 @@ -// min-llvm-version 8.0 // ignore-tidy-linelength // compile-flags: -Z instrument-mcount diff --git a/src/test/debuginfo/borrowed-enum.rs b/src/test/debuginfo/borrowed-enum.rs index 63c11f59c157d..85e11c10c688f 100644 --- a/src/test/debuginfo/borrowed-enum.rs +++ b/src/test/debuginfo/borrowed-enum.rs @@ -1,7 +1,6 @@ // ignore-tidy-linelength -// Require LLVM with DW_TAG_variant_part and a gdb or lldb that can read it. -// min-system-llvm-version: 8.0 +// Require a gdb or lldb that can read DW_TAG_variant_part. // min-gdb-version: 8.2 // rust-lldb diff --git a/src/test/debuginfo/enum-thinlto.rs b/src/test/debuginfo/enum-thinlto.rs index 13577b0587ff0..9359e55dceed3 100644 --- a/src/test/debuginfo/enum-thinlto.rs +++ b/src/test/debuginfo/enum-thinlto.rs @@ -1,5 +1,4 @@ -// Require LLVM with DW_TAG_variant_part and a gdb that can read it. -// min-system-llvm-version: 8.0 +// Require a gdb that can read DW_TAG_variant_part. // min-gdb-version: 8.2 // compile-flags:-g -Z thinlto diff --git a/src/test/debuginfo/generator-objects.rs b/src/test/debuginfo/generator-objects.rs index f19a3c71dd8d2..382b0231d3bd2 100644 --- a/src/test/debuginfo/generator-objects.rs +++ b/src/test/debuginfo/generator-objects.rs @@ -1,7 +1,6 @@ // ignore-tidy-linelength -// Require LLVM with DW_TAG_variant_part and a gdb that can read it. -// min-system-llvm-version: 8.0 +// Require a gdb that can read DW_TAG_variant_part. // min-gdb-version: 8.2 // compile-flags:-g diff --git a/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs b/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs index 72d38a6f04544..adcb04da30d06 100644 --- a/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs +++ b/src/test/debuginfo/generic-enum-with-different-disr-sizes.rs @@ -1,8 +1,7 @@ // ignore-lldb: FIXME(#27089) // min-lldb-version: 310 -// Require LLVM with DW_TAG_variant_part and a gdb that can read it. -// min-system-llvm-version: 8.0 +// Require a gdb that can read DW_TAG_variant_part. // min-gdb-version: 8.2 // compile-flags:-g diff --git a/src/test/debuginfo/generic-struct-style-enum.rs b/src/test/debuginfo/generic-struct-style-enum.rs index 3dc5cb807b452..678ca8df04068 100644 --- a/src/test/debuginfo/generic-struct-style-enum.rs +++ b/src/test/debuginfo/generic-struct-style-enum.rs @@ -1,8 +1,7 @@ // ignore-tidy-linelength // min-lldb-version: 310 -// Require LLVM with DW_TAG_variant_part and a gdb that can read it. -// min-system-llvm-version: 8.0 +// Require a gdb that can read DW_TAG_variant_part. // min-gdb-version: 8.2 // compile-flags:-g diff --git a/src/test/debuginfo/generic-tuple-style-enum.rs b/src/test/debuginfo/generic-tuple-style-enum.rs index b16634ee6d7f9..89aa78a6e1049 100644 --- a/src/test/debuginfo/generic-tuple-style-enum.rs +++ b/src/test/debuginfo/generic-tuple-style-enum.rs @@ -1,8 +1,6 @@ // ignore-tidy-linelength -// Require LLVM with DW_TAG_variant_part and a gdb and lldb that can -// read it. -// min-system-llvm-version: 8.0 +// Require a gdb or lldb that can read DW_TAG_variant_part. // min-gdb-version: 8.2 // rust-lldb diff --git a/src/test/debuginfo/issue-57822.rs b/src/test/debuginfo/issue-57822.rs index 4de88e9dae62b..e9cfa3f7d69f7 100644 --- a/src/test/debuginfo/issue-57822.rs +++ b/src/test/debuginfo/issue-57822.rs @@ -1,8 +1,7 @@ // This test makes sure that the LLDB pretty printer does not throw an exception // for nested closures and generators. -// Require LLVM with DW_TAG_variant_part and a gdb that can read it. -// min-system-llvm-version: 8.0 +// Require a gdb that can read DW_TAG_variant_part. // min-gdb-version: 8.2 // ignore-tidy-linelength diff --git a/src/test/debuginfo/recursive-struct.rs b/src/test/debuginfo/recursive-struct.rs index 4f75ef4fa9b9a..c0bd67367012f 100644 --- a/src/test/debuginfo/recursive-struct.rs +++ b/src/test/debuginfo/recursive-struct.rs @@ -1,7 +1,6 @@ // ignore-lldb -// Require LLVM with DW_TAG_variant_part and a gdb that can read it. -// min-system-llvm-version: 8.0 +// Require a gdb that can read DW_TAG_variant_part. // min-gdb-version: 8.2 // compile-flags:-g diff --git a/src/test/debuginfo/struct-style-enum.rs b/src/test/debuginfo/struct-style-enum.rs index 5843b076b1f46..34f75a4e3045b 100644 --- a/src/test/debuginfo/struct-style-enum.rs +++ b/src/test/debuginfo/struct-style-enum.rs @@ -1,8 +1,6 @@ // ignore-tidy-linelength -// Require LLVM with DW_TAG_variant_part and a gdb and lldb that can -// read it. -// min-system-llvm-version: 8.0 +// Require a gdb or lldb that can read DW_TAG_variant_part. // min-gdb-version: 8.2 // rust-lldb diff --git a/src/test/debuginfo/tuple-style-enum.rs b/src/test/debuginfo/tuple-style-enum.rs index 4d9727a388b8e..87b0bc6294dd9 100644 --- a/src/test/debuginfo/tuple-style-enum.rs +++ b/src/test/debuginfo/tuple-style-enum.rs @@ -1,8 +1,6 @@ // ignore-tidy-linelength -// Require LLVM with DW_TAG_variant_part and a gdb and lldb that can -// read it. -// min-system-llvm-version: 8.0 +// Require a gdb or lldb that can read DW_TAG_variant_part. // min-gdb-version: 8.2 // rust-lldb diff --git a/src/test/debuginfo/unique-enum.rs b/src/test/debuginfo/unique-enum.rs index c440ce059f721..9d938b6e36919 100644 --- a/src/test/debuginfo/unique-enum.rs +++ b/src/test/debuginfo/unique-enum.rs @@ -1,6 +1,4 @@ -// Require LLVM with DW_TAG_variant_part and a gdb and lldb that can -// read it. -// min-system-llvm-version: 8.0 +// Require a gdb or lldb that can read DW_TAG_variant_part. // min-gdb-version: 8.2 // rust-lldb diff --git a/src/test/ui/simd/simd-intrinsic-generic-arithmetic-saturating.rs b/src/test/ui/simd/simd-intrinsic-generic-arithmetic-saturating.rs index b2ddcf023ebcb..e664ecadda259 100644 --- a/src/test/ui/simd/simd-intrinsic-generic-arithmetic-saturating.rs +++ b/src/test/ui/simd/simd-intrinsic-generic-arithmetic-saturating.rs @@ -1,6 +1,5 @@ // run-pass // ignore-emscripten -// min-llvm-version 8.0 #![allow(non_camel_case_types)] #![feature(repr_simd, platform_intrinsics)]