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

@@ -123,12 +123,6 @@ extern "C" void LLVMRustSetLastError(const char *Err) {
LastError = strdup(Err);
}
extern "C" LLVMContextRef LLVMRustContextCreate(bool shouldDiscardNames) {
auto ctx = new LLVMContext();
ctx->setDiscardValueNames(shouldDiscardNames);
return wrap(ctx);
}
extern "C" void LLVMRustSetNormalizedTarget(LLVMModuleRef M,
const char *Target) {
#if LLVM_VERSION_GE(21, 0)