LLVM 19.0.0git
Functions
Collaboration diagram for Metadata:

Functions

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

Detailed Description

Function Documentation

◆ LLVMGetMDNodeNumOperands()

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 1277 of file Core.cpp.

Referenced by LLVMGetNumOperands().

◆ LLVMGetMDNodeOperands()

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 1332 of file Core.cpp.

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

◆ LLVMGetMDString()

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 1267 of file Core.cpp.

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

◆ LLVMMDNode()

LLVMValueRef LLVMMDNode ( LLVMValueRef Vals,
unsigned  Count 
)

Deprecated: Use LLVMMDNodeInContext2 instead.

Definition at line 1250 of file Core.cpp.

References LLVMGetGlobalContext(), and LLVMMDNodeInContext().

◆ LLVMMDNodeInContext()

LLVMValueRef LLVMMDNodeInContext ( LLVMContextRef  C,
LLVMValueRef Vals,
unsigned  Count 
)

◆ LLVMMDNodeInContext2()

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 1207 of file Core.cpp.

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

◆ LLVMMDString()

LLVMValueRef LLVMMDString ( const char Str,
unsigned  SLen 
)

Deprecated: Use LLVMMDStringInContext2 instead.

Definition at line 1219 of file Core.cpp.

References LLVMGetGlobalContext(), and LLVMMDStringInContext().

◆ LLVMMDStringInContext()

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

Deprecated: Use LLVMMDStringInContext2 instead.

Definition at line 1212 of file Core.cpp.

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

Referenced by LLVMMDString().

◆ LLVMMDStringInContext2()

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 1202 of file Core.cpp.

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

◆ LLVMMetadataAsValue()

LLVMValueRef LLVMMetadataAsValue ( LLVMContextRef  C,
LLVMMetadataRef  MD 
)

Obtain a Metadata as a Value.

Definition at line 1254 of file Core.cpp.

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

◆ LLVMReplaceMDNodeOperandWith()

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 1345 of file Core.cpp.

References N, and llvm::unwrap().

◆ LLVMValueAsMetadata()

LLVMMetadataRef LLVMValueAsMetadata ( LLVMValueRef  Val)

Obtain a Value as a Metadata.

Definition at line 1258 of file Core.cpp.

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