Rollup merge of #75457 - Mark-Simulacrum:llvm-clean, r=cuviper

Remove some dead variants in LLVM FFI

r? @nikic or @cuviper
This commit is contained in:
Yuki Okushi
2020-08-13 11:05:44 +09:00
committed by GitHub
6 changed files with 0 additions and 25 deletions
-1
View File
@@ -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
View File
@@ -337,9 +337,6 @@ pub fn from_generic(ao: rustc_codegen_ssa::common::AtomicOrdering) -> Self {
#[derive(Copy, Clone)]
#[repr(C)]
pub enum SynchronizationScope {
// FIXME: figure out if this variant is needed at all.
#[allow(dead_code)]
Other,
SingleThread,
CrossThread,
}
@@ -347,7 +344,6 @@ pub enum SynchronizationScope {
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 @@ pub fn from_generic(sc: rustc_codegen_ssa::common::SynchronizationScope) -> Self
#[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 @@ pub fn from_generic(asm: rustc_ast::ast::LlvmAsmDialect) -> Self {
#[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
View File
@@ -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
View File
@@ -35,7 +35,6 @@ struct RustArchiveIterator {
};
enum class LLVMRustArchiveKind {
Other,
GNU,
BSD,
DARWIN,
-2
View File
@@ -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
View File
@@ -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,
};