Replace LLVMRustContextCreate with normal LLVM-C API calls

Since `LLVMRustContextCreate` can easily be replaced with a call to
`LLVMContextCreate` and `LLVMContextSetDiscardValueNames`.
This commit is contained in:
AMS21
2025-10-10 12:16:11 +02:00
parent 9725c4baac
commit 0abecda9ed
3 changed files with 10 additions and 12 deletions

View File

@@ -905,7 +905,9 @@ pub(crate) type GetSymbolsErrorCallback = unsafe extern "C" fn(*const c_char) ->
unsafe extern "C" {
// Create and destroy contexts.
pub(crate) fn LLVMContextCreate() -> &'static mut Context;
pub(crate) fn LLVMContextDispose(C: &'static mut Context);
pub(crate) fn LLVMContextSetDiscardValueNames(C: &Context, Discard: Bool);
pub(crate) fn LLVMGetMDKindIDInContext(
C: &Context,
Name: *const c_char,
@@ -1925,9 +1927,6 @@ unsafe extern "C" {
pub(crate) fn LLVMRustInstallErrorHandlers();
pub(crate) fn LLVMRustDisableSystemDialogsOnCrash();
// Create and destroy contexts.
pub(crate) fn LLVMRustContextCreate(shouldDiscardNames: bool) -> &'static mut Context;
// Operations on all values
pub(crate) fn LLVMRustGlobalAddMetadata<'a>(
Val: &'a Value,