pub struct MetadataKindId(pub u32);
Expand description
Wrapper for MetadataKindId
Tuple Fields§
§0: u32
Implementations§
source§impl MetadataKindId
impl MetadataKindId
sourcepub fn get_md_kind_id_in_context(context: &ContextRef, name: &str) -> Self
pub fn get_md_kind_id_in_context(context: &ContextRef, name: &str) -> Self
Get MetadataKindId
by name in current Context
.
Useful for working with Metadata.
§Details
Retrieves the metadata kind ID associated with a given name within a specific LLVM context.
This function wraps the LLVMGetMDKindIDInContext
function from the LLVM core library. It returns the metadata kind ID
corresponding to the provided name within the specified LLVM context. Metadata kinds in LLVM IR are used to attach
additional information to various IR constructs, such as instructions or functions. Using this function allows for
context-specific retrieval of metadata kind IDs.
§Parameters
context
: A reference to theContextRef
in which the metadata kind ID will be retrieved.name
: A string slice (&str
) representing the name of the metadata kind.
§Returns
Returns a MetadataKindId
representing the ID associated with the provided metadata kind name within the specified context.
sourcepub fn get_md_kind_id(name: &str) -> Self
pub fn get_md_kind_id(name: &str) -> Self
Get Metadata KindId
by name.
Useful for working with Metadata.
§Details
Retrieves the metadata kind ID associated with a given name.
This function wraps the LLVMGetMDKindID
function from the LLVM core library. It returns the metadata kind ID
corresponding to the provided name. Metadata kinds in LLVM IR are used to attach additional information to
various IR constructs, such as instructions or functions.
§Parameters
name
: A string slice (&str
) representing the name of the metadata kind.
§Returns
Returns a MetadataKindId
representing the ID associated with the provided metadata kind name.