Auto merge of #130389 - Luv-Ray:LLVMMDNodeInContext2, r=nikic

llvm: replace some deprecated functions

`LLVMMDStringInContext` and `LLVMMDNodeInContext` are deprecated, replace them with `LLVMMDStringInContext2` and `LLVMMDNodeInContext2`.
Also replace `Value` with `Metadata` in some function signatures for better consistency.
This commit is contained in:
bors 2024-09-24 12:07:48 +00:00
commit 4cbfcf1b7f
14 changed files with 66 additions and 91 deletions

View file

@ -14,7 +14,7 @@ use tracing::debug;
use crate::consts::const_alloc_to_llvm;
pub(crate) use crate::context::CodegenCx;
use crate::llvm::{self, BasicBlock, Bool, ConstantInt, False, OperandBundleDef, True};
use crate::llvm::{self, BasicBlock, Bool, ConstantInt, False, Metadata, OperandBundleDef, True};
use crate::type_::Type;
use crate::value::Value;
@ -79,6 +79,7 @@ impl<'ll> Funclet<'ll> {
impl<'ll> BackendTypes for CodegenCx<'ll, '_> {
type Value = &'ll Value;
type Metadata = &'ll Metadata;
// FIXME(eddyb) replace this with a `Function` "subclass" of `Value`.
type Function = &'ll Value;