LLVM 22.0.0git
Collaboration diagram for Metadata:

Functions

LLVM_C_ABI LLVMMetadataRef LLVMMDStringInContext2 (LLVMContextRef C, const char *Str, size_t SLen)
 Create an MDString value from a given string value.
LLVM_C_ABI LLVMMetadataRef LLVMMDNodeInContext2 (LLVMContextRef C, LLVMMetadataRef *MDs, size_t Count)
 Create an MDNode value with the given array of operands.
LLVM_C_ABI LLVMValueRef LLVMMetadataAsValue (LLVMContextRef C, LLVMMetadataRef MD)
 Obtain a Metadata as a Value.
LLVM_C_ABI LLVMMetadataRef LLVMValueAsMetadata (LLVMValueRef Val)
 Obtain a Value as a Metadata.
LLVM_C_ABI const charLLVMGetMDString (LLVMValueRef V, unsigned *Length)
 Obtain the underlying string from a MDString value.
LLVM_C_ABI unsigned LLVMGetMDNodeNumOperands (LLVMValueRef V)
 Obtain the number of operands from an MDNode value.
LLVM_C_ABI void LLVMGetMDNodeOperands (LLVMValueRef V, LLVMValueRef *Dest)
 Obtain the given MDNode's operands.
LLVM_C_ABI void LLVMReplaceMDNodeOperandWith (LLVMValueRef V, unsigned Index, LLVMMetadataRef Replacement)
 Replace an operand at a specific index in a llvm::MDNode value.
LLVM_C_ABI LLVMValueRef LLVMMDStringInContext (LLVMContextRef C, const char *Str, unsigned SLen)
 Deprecated: Use LLVMMDStringInContext2 instead.
LLVM_C_ABI LLVM_ATTRIBUTE_C_DEPRECATED (LLVMValueRef LLVMMDString(const char *Str, unsigned SLen), "Use of the global context is deprecated, use LLVMMDStringInContext2 " "instead")
 Deprecated: Use LLVMMDStringInContext2 instead.
LLVM_C_ABI LLVMValueRef LLVMMDNodeInContext (LLVMContextRef C, LLVMValueRef *Vals, unsigned Count)
 Deprecated: Use LLVMMDNodeInContext2 instead.
LLVM_C_ABI LLVM_ATTRIBUTE_C_DEPRECATED (LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count), "Use of the global context is deprecated, use LLVMMDNodeInContext2 " "instead")
 Deprecated: Use LLVMMDNodeInContext2 instead.

Detailed Description

Function Documentation

◆ LLVM_ATTRIBUTE_C_DEPRECATED() [1/2]

LLVM_C_ABI LLVM_ATTRIBUTE_C_DEPRECATED ( LLVMValueRef LLVMMDNodeLLVMValueRef *Vals, unsigned Count,
"Use of the global context is deprecated,
use LLVMMDNodeInContext2 " "instead"  )

Deprecated: Use LLVMMDNodeInContext2 instead.

References C(), and LLVM_C_ABI.

◆ LLVM_ATTRIBUTE_C_DEPRECATED() [2/2]

LLVM_C_ABI LLVM_ATTRIBUTE_C_DEPRECATED ( LLVMValueRef LLVMMDStringconst char *Str, unsigned SLen,
"Use of the global context is deprecated,
use LLVMMDStringInContext2 " "instead"  )

Deprecated: Use LLVMMDStringInContext2 instead.

References C(), and LLVM_C_ABI.

◆ LLVMGetMDNodeNumOperands()

LLVM_C_ABI unsigned LLVMGetMDNodeNumOperands ( LLVMValueRef V)

Obtain the number of operands from an MDNode value.

Parameters
VMDNode to get number of operands from.
Returns
Number of operands of the MDNode.

Definition at line 1360 of file Core.cpp.

References llvm::cast(), llvm::isa(), and llvm::unwrap().

Referenced by LLVMGetNumOperands().

◆ LLVMGetMDNodeOperands()

LLVM_C_ABI void LLVMGetMDNodeOperands ( LLVMValueRef V,
LLVMValueRef * Dest )

Obtain the given MDNode's operands.

The passed LLVMValueRef pointer should point to enough memory to hold all of the operands of the given MDNode (see LLVMGetMDNodeNumOperands) as LLVMValueRefs. This memory will be populated with the LLVMValueRefs of the MDNode's operands.

Parameters
VMDNode to get the operands from.
DestDestination array for operands.

Definition at line 1415 of file Core.cpp.

References llvm::cast(), llvm::dyn_cast(), getMDNodeOperandImpl(), N, llvm::unwrap(), and llvm::wrap().

◆ LLVMGetMDString()

LLVM_C_ABI const char * LLVMGetMDString ( LLVMValueRef V,
unsigned * Length )

Obtain the underlying string from a MDString value.

Parameters
VInstance to obtain string from.
LengthMemory address which will hold length of returned string.
Returns
String data in MDString.

Definition at line 1350 of file Core.cpp.

References llvm::dyn_cast(), llvm::Length, and llvm::unwrap().

◆ LLVMMDNodeInContext()

◆ LLVMMDNodeInContext2()

LLVM_C_ABI LLVMMetadataRef LLVMMDNodeInContext2 ( LLVMContextRef C,
LLVMMetadataRef * MDs,
size_t Count )

Create an MDNode value with the given array of operands.

See also
llvm::MDNode::get()

Definition at line 1290 of file Core.cpp.

References llvm::CallingConv::C, llvm::Count, llvm::MDNode::get(), llvm::unwrap(), and llvm::wrap().

◆ LLVMMDStringInContext()

LLVM_C_ABI LLVMValueRef LLVMMDStringInContext ( LLVMContextRef C,
const char * Str,
unsigned SLen )

Deprecated: Use LLVMMDStringInContext2 instead.

Definition at line 1295 of file Core.cpp.

References llvm::CallingConv::C, llvm::MDString::get(), llvm::MetadataAsValue::get(), llvm::unwrap(), and llvm::wrap().

Referenced by LLVMMDString().

◆ LLVMMDStringInContext2()

LLVM_C_ABI LLVMMetadataRef LLVMMDStringInContext2 ( LLVMContextRef C,
const char * Str,
size_t SLen )

Create an MDString value from a given string value.

The MDString value does not take ownership of the given string, it remains the responsibility of the caller to free it.

See also
llvm::MDString::get()

Definition at line 1285 of file Core.cpp.

References llvm::CallingConv::C, llvm::MDString::get(), llvm::unwrap(), and llvm::wrap().

◆ LLVMMetadataAsValue()

LLVM_C_ABI LLVMValueRef LLVMMetadataAsValue ( LLVMContextRef C,
LLVMMetadataRef MD )

Obtain a Metadata as a Value.

Definition at line 1337 of file Core.cpp.

References llvm::CallingConv::C, llvm::MetadataAsValue::get(), llvm::unwrap(), and llvm::wrap().

◆ LLVMReplaceMDNodeOperandWith()

LLVM_C_ABI void LLVMReplaceMDNodeOperandWith ( LLVMValueRef V,
unsigned Index,
LLVMMetadataRef Replacement )

Replace an operand at a specific index in a llvm::MDNode value.

See also
llvm::MDNode::replaceOperandWith()

Definition at line 1428 of file Core.cpp.

References llvm::cast(), N, and llvm::unwrap().

◆ LLVMValueAsMetadata()

LLVM_C_ABI LLVMMetadataRef LLVMValueAsMetadata ( LLVMValueRef Val)