From 7a0b195188c253e8910ea203beb7c1682004c33e Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Wed, 12 Aug 2020 12:01:20 -0400 Subject: [PATCH] Remove CodeGenOptLevel::Other Also introduced in #35174, and immediately unused. --- src/librustc_codegen_llvm/back/write.rs | 1 - src/librustc_codegen_llvm/llvm/ffi.rs | 3 --- src/rustllvm/PassWrapper.cpp | 1 - 3 files changed, 5 deletions(-) diff --git a/src/librustc_codegen_llvm/back/write.rs b/src/librustc_codegen_llvm/back/write.rs index 54271d3dd04..1a5794d1133 100644 --- a/src/librustc_codegen_llvm/back/write.rs +++ b/src/librustc_codegen_llvm/back/write.rs @@ -975,7 +975,6 @@ pub unsafe fn with_llvm_pmb( (llvm::CodeGenOptLevel::Default, ..) => { llvm::LLVMPassManagerBuilderUseInlinerWithThreshold(builder, 225); } - (llvm::CodeGenOptLevel::Other, ..) => bug!("CodeGenOptLevel::Other selected"), } f(builder); diff --git a/src/librustc_codegen_llvm/llvm/ffi.rs b/src/librustc_codegen_llvm/llvm/ffi.rs index 0ab69298bc4..de547c0b1b9 100644 --- a/src/librustc_codegen_llvm/llvm/ffi.rs +++ b/src/librustc_codegen_llvm/llvm/ffi.rs @@ -401,9 +401,6 @@ impl AsmDialect { #[derive(Copy, Clone, PartialEq)] #[repr(C)] pub enum CodeGenOptLevel { - // FIXME: figure out if this variant is needed at all. - #[allow(dead_code)] - Other, None, Less, Default, diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp index 0008ec0815a..76fe5e7f769 100644 --- a/src/rustllvm/PassWrapper.cpp +++ b/src/rustllvm/PassWrapper.cpp @@ -311,7 +311,6 @@ static Optional fromRust(LLVMRustCodeModel Model) { } enum class LLVMRustCodeGenOptLevel { - Other, None, Less, Default,