Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some dead variants in LLVM FFI #75457

Merged
merged 5 commits into from
Aug 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/librustc_codegen_llvm/back/write.rs
Original file line number Diff line number Diff line change
@@ -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);
16 changes: 0 additions & 16 deletions src/librustc_codegen_llvm/llvm/ffi.rs
Original file line number Diff line number Diff line change
@@ -337,17 +337,13 @@ impl AtomicOrdering {
#[derive(Copy, Clone)]
#[repr(C)]
pub enum SynchronizationScope {
// FIXME: figure out if this variant is needed at all.
#[allow(dead_code)]
Other,
SingleThread,
CrossThread,
}

impl SynchronizationScope {
pub fn from_generic(sc: rustc_codegen_ssa::common::SynchronizationScope) -> Self {
match sc {
rustc_codegen_ssa::common::SynchronizationScope::Other => SynchronizationScope::Other,
rustc_codegen_ssa::common::SynchronizationScope::SingleThread => {
SynchronizationScope::SingleThread
}
@@ -362,9 +358,6 @@ impl SynchronizationScope {
#[derive(Copy, Clone)]
#[repr(C)]
pub enum FileType {
// FIXME: figure out if this variant is needed at all.
#[allow(dead_code)]
Other,
AssemblyFile,
ObjectFile,
}
@@ -391,9 +384,6 @@ pub enum MetadataType {
#[derive(Copy, Clone)]
#[repr(C)]
pub enum AsmDialect {
// FIXME: figure out if this variant is needed at all.
#[allow(dead_code)]
Other,
Att,
Intel,
}
@@ -411,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,
@@ -513,9 +500,6 @@ pub enum DiagnosticLevel {
#[derive(Copy, Clone)]
#[repr(C)]
pub enum ArchiveKind {
// FIXME: figure out if this variant is needed at all.
#[allow(dead_code)]
Other,
K_GNU,
K_BSD,
K_DARWIN,
3 changes: 0 additions & 3 deletions src/librustc_codegen_ssa/common.rs
Original file line number Diff line number Diff line change
@@ -72,9 +72,6 @@ pub enum AtomicOrdering {
}

pub enum SynchronizationScope {
// FIXME: figure out if this variant is needed at all.
#[allow(dead_code)]
Other,
SingleThread,
CrossThread,
}
1 change: 0 additions & 1 deletion src/rustllvm/ArchiveWrapper.cpp
Original file line number Diff line number Diff line change
@@ -35,7 +35,6 @@ struct RustArchiveIterator {
};

enum class LLVMRustArchiveKind {
Other,
GNU,
BSD,
DARWIN,
2 changes: 0 additions & 2 deletions src/rustllvm/PassWrapper.cpp
Original file line number Diff line number Diff line change
@@ -311,7 +311,6 @@ static Optional<CodeModel::Model> fromRust(LLVMRustCodeModel Model) {
}

enum class LLVMRustCodeGenOptLevel {
Other,
None,
Less,
Default,
@@ -597,7 +596,6 @@ extern "C" void LLVMRustSetLLVMOptions(int Argc, char **Argv) {
}

enum class LLVMRustFileType {
Other,
AssemblyFile,
ObjectFile,
};
2 changes: 0 additions & 2 deletions src/rustllvm/RustWrapper.cpp
Original file line number Diff line number Diff line change
@@ -366,7 +366,6 @@ LLVMRustBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMValueRef Target,
}

enum class LLVMRustSynchronizationScope {
Other,
SingleThread,
CrossThread,
};
@@ -389,7 +388,6 @@ LLVMRustBuildAtomicFence(LLVMBuilderRef B, LLVMAtomicOrdering Order,
}

enum class LLVMRustAsmDialect {
Other,
Att,
Intel,
};