rust/compiler/rustc_codegen_llvm/src
bors be33e4f3d6 Auto merge of #132167 - Zalathar:llvm-wrappers, r=jieyouxu
Replace some LLVMRust wrappers with calls to the LLVM C API

This PR removes the LLVMRust wrapper functions for getting/setting linkage and visibility, and replaces them with direct calls to the corresponding functions in LLVM's C API.

To make this convenient and sound, two pieces of supporting code have also been added:
- A simple proc-macro that derives `TryFrom<u32>` for fieldless enums
- A wrapper type for C enum values returned by LLVM functions, to ensure soundness if LLVM returns an enum value we don't know about

In a few places, the use of safe wrapper functions means that an `unsafe` block is no longer needed, so the affected code has changed its indentation level.
2024-10-27 03:24:54 +00:00
..
back Use safe wrappers get_linkage and set_linkage 2024-10-26 20:20:18 +11:00
coverageinfo Rollup merge of #132124 - Zalathar:consolidate-covstar, r=jieyouxu 2024-10-26 22:01:12 +08:00
debuginfo Use safe wrappers get_linkage and set_linkage 2024-10-26 20:20:18 +11:00
llvm Use LLVM-C APIs for getting/setting visibility 2024-10-27 11:05:33 +11:00
abi.rs compiler: Factor rustc_target::abi out of cg_llvm 2024-10-08 18:24:56 -07:00
allocator.rs Use safe wrappers get_visibility and set_visibility 2024-10-26 20:20:20 +11:00
asm.rs Fix AArch64InlineAsmReg::emit 2024-10-14 06:04:07 +09:00
attributes.rs codegen_ssa: consolidate tied feature checking 2024-09-24 15:48:49 +01:00
base.rs Add warn(unreachable_pub) to rustc_codegen_llvm. 2024-08-16 08:46:57 +10:00
builder.rs coverage: SSA doesn't need to know about instrprof_increment 2024-10-25 14:24:05 +11:00
callee.rs Use safe wrappers get_visibility and set_visibility 2024-10-26 20:20:20 +11:00
common.rs Use safe wrappers get_linkage and set_linkage 2024-10-26 20:20:18 +11:00
consts.rs Use safe wrappers get_visibility and set_visibility 2024-10-26 20:20:20 +11:00
context.rs Auto merge of #132167 - Zalathar:llvm-wrappers, r=jieyouxu 2024-10-27 03:24:54 +00:00
declare.rs Use Default visibility for rustc-generated C symbol declarations 2024-10-11 08:43:27 +11:00
errors.rs codegen_ssa: consolidate tied feature checking 2024-09-24 15:48:49 +01:00
intrinsic.rs Use safe wrappers get_linkage and set_linkage 2024-10-26 20:20:18 +11:00
lib.rs Use &raw in the compiler 2024-09-26 20:33:26 -07:00
llvm_util.rs rustc_target: Add pauth-lr aarch64 target feature 2024-10-16 18:00:51 +01:00
mono_item.rs Use safe wrappers get_visibility and set_visibility 2024-10-26 20:20:20 +11:00
type_.rs replace some deprecated functions 2024-09-19 09:39:28 +08:00
type_of.rs "innermost", "outermost", "leftmost", and "rightmost" don't need hyphens 2024-10-23 02:45:24 -07:00
va_arg.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
value.rs Add warn(unreachable_pub) to rustc_codegen_llvm. 2024-08-16 08:46:57 +10:00