Skip to content

Commit 4cf55a6

Browse files
authored
Rollup merge of #75457 - Mark-Simulacrum:llvm-clean, r=cuviper
Remove some dead variants in LLVM FFI r? @nikic or @cuviper
2 parents 9ea03dd + 486c48b commit 4cf55a6

File tree

6 files changed

+0
-25
lines changed

6 files changed

+0
-25
lines changed

src/librustc_codegen_llvm/back/write.rs

-1
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,6 @@ pub unsafe fn with_llvm_pmb(
975975
(llvm::CodeGenOptLevel::Default, ..) => {
976976
llvm::LLVMPassManagerBuilderUseInlinerWithThreshold(builder, 225);
977977
}
978-
(llvm::CodeGenOptLevel::Other, ..) => bug!("CodeGenOptLevel::Other selected"),
979978
}
980979

981980
f(builder);

src/librustc_codegen_llvm/llvm/ffi.rs

-16
Original file line numberDiff line numberDiff line change
@@ -337,17 +337,13 @@ impl AtomicOrdering {
337337
#[derive(Copy, Clone)]
338338
#[repr(C)]
339339
pub enum SynchronizationScope {
340-
// FIXME: figure out if this variant is needed at all.
341-
#[allow(dead_code)]
342-
Other,
343340
SingleThread,
344341
CrossThread,
345342
}
346343

347344
impl SynchronizationScope {
348345
pub fn from_generic(sc: rustc_codegen_ssa::common::SynchronizationScope) -> Self {
349346
match sc {
350-
rustc_codegen_ssa::common::SynchronizationScope::Other => SynchronizationScope::Other,
351347
rustc_codegen_ssa::common::SynchronizationScope::SingleThread => {
352348
SynchronizationScope::SingleThread
353349
}
@@ -362,9 +358,6 @@ impl SynchronizationScope {
362358
#[derive(Copy, Clone)]
363359
#[repr(C)]
364360
pub enum FileType {
365-
// FIXME: figure out if this variant is needed at all.
366-
#[allow(dead_code)]
367-
Other,
368361
AssemblyFile,
369362
ObjectFile,
370363
}
@@ -391,9 +384,6 @@ pub enum MetadataType {
391384
#[derive(Copy, Clone)]
392385
#[repr(C)]
393386
pub enum AsmDialect {
394-
// FIXME: figure out if this variant is needed at all.
395-
#[allow(dead_code)]
396-
Other,
397387
Att,
398388
Intel,
399389
}
@@ -411,9 +401,6 @@ impl AsmDialect {
411401
#[derive(Copy, Clone, PartialEq)]
412402
#[repr(C)]
413403
pub enum CodeGenOptLevel {
414-
// FIXME: figure out if this variant is needed at all.
415-
#[allow(dead_code)]
416-
Other,
417404
None,
418405
Less,
419406
Default,
@@ -513,9 +500,6 @@ pub enum DiagnosticLevel {
513500
#[derive(Copy, Clone)]
514501
#[repr(C)]
515502
pub enum ArchiveKind {
516-
// FIXME: figure out if this variant is needed at all.
517-
#[allow(dead_code)]
518-
Other,
519503
K_GNU,
520504
K_BSD,
521505
K_DARWIN,

src/librustc_codegen_ssa/common.rs

-3
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ pub enum AtomicOrdering {
7272
}
7373

7474
pub enum SynchronizationScope {
75-
// FIXME: figure out if this variant is needed at all.
76-
#[allow(dead_code)]
77-
Other,
7875
SingleThread,
7976
CrossThread,
8077
}

src/rustllvm/ArchiveWrapper.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ struct RustArchiveIterator {
3535
};
3636

3737
enum class LLVMRustArchiveKind {
38-
Other,
3938
GNU,
4039
BSD,
4140
DARWIN,

src/rustllvm/PassWrapper.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,6 @@ static Optional<CodeModel::Model> fromRust(LLVMRustCodeModel Model) {
311311
}
312312

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

599598
enum class LLVMRustFileType {
600-
Other,
601599
AssemblyFile,
602600
ObjectFile,
603601
};

src/rustllvm/RustWrapper.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,6 @@ LLVMRustBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMValueRef Target,
366366
}
367367

368368
enum class LLVMRustSynchronizationScope {
369-
Other,
370369
SingleThread,
371370
CrossThread,
372371
};
@@ -389,7 +388,6 @@ LLVMRustBuildAtomicFence(LLVMBuilderRef B, LLVMAtomicOrdering Order,
389388
}
390389

391390
enum class LLVMRustAsmDialect {
392-
Other,
393391
Att,
394392
Intel,
395393
};

0 commit comments

Comments
 (0)