Remove dead code from rustc_codegen_llvm and the LLVM wrapper#136653
Remove dead code from rustc_codegen_llvm and the LLVM wrapper#136653bors merged 1 commit intorust-lang:masterfrom
Conversation
| pub struct OptimizationDiagnostic { | ||
| pub kind: OptimizationDiagnosticKind, | ||
| pub pass_name: String, | ||
| pub function: &'ll Value, |
There was a problem hiding this comment.
This field should be kept, even if it's currently unused on the Rust side, because it reflects part of a larger LLVM data structure.
(Keeping C++ and Rust in sync is easier if we don't have ad-hoc gaps in individual structures and enums.)
| Unsupported(&'ll DiagnosticInfo), | ||
|
|
||
| /// LLVM has other types that we do not wrap here. | ||
| UnknownDiagnostic(&'ll DiagnosticInfo), |
There was a problem hiding this comment.
Similarly, this field shouldn't be removed, even if it's unused.
| pub enum LLVMMachineType { | ||
| AMD64 = 0x8664, | ||
| I386 = 0x14c, | ||
| ARM64 = 0xaa64, | ||
| ARM64EC = 0xa641, | ||
| ARM = 0x01c0, | ||
| } |
There was a problem hiding this comment.
Historical note: It looks like we used to pass this to LLVM code for emitting import libraries on Windows, and it probably became unnecessary after #129164. Good to remove.
| pub enum TailCallKind { | ||
| None, | ||
| Tail, | ||
| MustTail, | ||
| NoTail, | ||
| } |
There was a problem hiding this comment.
Remark: This removal was justified in #135502 (comment), so good to remove.
| } | ||
|
|
||
| pub type DiagnosticHandlerTy = unsafe extern "C" fn(&DiagnosticInfo, *mut c_void); | ||
| pub type InlineAsmDiagHandlerTy = unsafe extern "C" fn(&SMDiagnostic, *const c_void, c_uint); |
There was a problem hiding this comment.
Historical note: Looks like this became unused in #100460.
|
|
||
| pub fn LLVMRustGetElementTypeArgIndex(CallSite: &Value) -> i32; | ||
|
|
||
| pub fn LLVMRustIsBitcode(ptr: *const u8, len: usize) -> bool; |
| pub type DIFile = DIScope; | ||
| pub type DILexicalBlock = DIScope; | ||
| pub type DISubprogram = DIScope; | ||
| pub type DINameSpace = DIScope; |
|
The changes to |
73d5478 to
2a6b274
Compare
Done |
|
Thanks! @bors r+ rollup |
Remove dead code from rustc_codegen_llvm and the LLVM wrapper First step to clean up the LLVM wrapper: remove existing dead code. Split out of rust-lang#135502 r? `@Zalathar`
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#134367 (Stabilize `feature(trait_upcasting)`) - rust-lang#135354 ([Debuginfo] Add MSVC Synthetic and Summary providers to LLDB) - rust-lang#135940 (Update toolstate maintainers) - rust-lang#135945 (Remove some unnecessary parens in `assert!` conditions) - rust-lang#136577 (Pattern Migration 2024: try to suggest eliding redundant binding modifiers) - rust-lang#136598 (Fix suggestion for `dependency_on_unit_never_type_fallback` involving closures + format args expansions) - rust-lang#136653 (Remove dead code from rustc_codegen_llvm and the LLVM wrapper) - rust-lang#136664 (replace one `.map_or(true, ...)` with `.is_none_or(...)`) Failed merges: - rust-lang#136193 (Implement pattern type ffi checks) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#134367 (Stabilize `feature(trait_upcasting)`) - rust-lang#135940 (Update toolstate maintainers) - rust-lang#135945 (Remove some unnecessary parens in `assert!` conditions) - rust-lang#136577 (Pattern Migration 2024: try to suggest eliding redundant binding modifiers) - rust-lang#136598 (Fix suggestion for `dependency_on_unit_never_type_fallback` involving closures + format args expansions) - rust-lang#136653 (Remove dead code from rustc_codegen_llvm and the LLVM wrapper) - rust-lang#136664 (replace one `.map_or(true, ...)` with `.is_none_or(...)`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#136653 - dpaoliello:cleanllvm1, r=Zalathar Remove dead code from rustc_codegen_llvm and the LLVM wrapper First step to clean up the LLVM wrapper: remove existing dead code. Split out of rust-lang#135502 r? ``@Zalathar``
First step to clean up the LLVM wrapper: remove existing dead code.
Split out of #135502
r? @Zalathar