LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
Metadata
Collaboration diagram for Metadata:

Functions

LLVMValueRef LLVMMDStringInContext (LLVMContextRef C, const char *Str, unsigned SLen)
 
LLVMValueRef LLVMMDString (const char *Str, unsigned SLen)
 
LLVMValueRef LLVMMDNodeInContext (LLVMContextRef C, LLVMValueRef *Vals, unsigned Count)
 
LLVMValueRef LLVMMDNode (LLVMValueRef *Vals, unsigned Count)
 
const char * LLVMGetMDString (LLVMValueRef V, unsigned *Len)
 
unsigned LLVMGetMDNodeNumOperands (LLVMValueRef V)
 
void LLVMGetMDNodeOperands (LLVMValueRef V, LLVMValueRef *Dest)
 

Detailed Description

Function Documentation

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

References llvm::unwrap().

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

References llvm::MDNode::getNumOperands(), llvm::MDNode::getOperand(), N, llvm::unwrap(), and llvm::wrap().

const char* LLVMGetMDString ( LLVMValueRef  V,
unsigned Len 
)

Obtain the underlying string from a MDString value.

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

Definition at line 609 of file Core.cpp.

References llvm::unwrap().

LLVMValueRef LLVMMDNode ( LLVMValueRef Vals,
unsigned  Count 
)

Obtain a MDNode value from the global context.

Definition at line 605 of file Core.cpp.

References LLVMGetGlobalContext(), and LLVMMDNodeInContext().

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

Obtain a MDNode value from a context.

The returned value corresponds to the llvm::MDNode class.

Definition at line 599 of file Core.cpp.

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

Referenced by LLVMMDNode().

LLVMValueRef LLVMMDString ( const char *  Str,
unsigned  SLen 
)

Obtain a MDString value from the global context.

Definition at line 595 of file Core.cpp.

References LLVMGetGlobalContext(), and LLVMMDStringInContext().

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

Obtain a MDString value from a context.

The returned instance corresponds to the llvm::MDString class.

The instance is specified by string data of a specified length. The string content is copied, so the backing memory can be freed after this function returns.

Definition at line 590 of file Core.cpp.

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

Referenced by LLVMMDString().