Rollup merge of #147488 - AMS21:remove_llvm_rust_insert_private_global, r=nikic

refactor: Remove `LLVMRustInsertPrivateGlobal` and `define_private_global`

Since it can easily be implemented using the existing LLVM C API in
terms of `LLVMAddGlobal` and `LLVMSetLinkage` and `define_private_global`
was only used in one place.

Work towards https://github.com/rust-lang/rust/issues/46437
This commit is contained in:
Stuart Cook
2025-10-09 18:43:26 +11:00
committed by GitHub
4 changed files with 4 additions and 16 deletions

View File

@@ -1955,7 +1955,6 @@ unsafe extern "C" {
NameLen: size_t,
T: &'a Type,
) -> &'a Value;
pub(crate) fn LLVMRustInsertPrivateGlobal<'a>(M: &'a Module, T: &'a Type) -> &'a Value;
pub(crate) fn LLVMRustGetNamedValue(
M: &Module,
Name: *const c_char,