summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbaldrick <baldrick@91177308-0d34-0410-b5e6-96231b3b80d8>2012-09-19 20:29:39 +0000
committerbaldrick <baldrick@91177308-0d34-0410-b5e6-96231b3b80d8>2012-09-19 20:29:39 +0000
commit4612f9d3b881e8e13c74215b80e96816cae16d14 (patch)
tree79e5a6b1c684dd9bb1f4815fda986dccb326ecba /include
parent10579dd7a166b6ff4ed27523e55f4abab0a2eacf (diff)
Add support for accessing an MDNode's operands via the C binding. Patch by
Anthony Bryant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164247 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm-c/Core.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/llvm-c/Core.h b/include/llvm-c/Core.h
index 6587e77080..4d3374958b 100644
--- a/include/llvm-c/Core.h
+++ b/include/llvm-c/Core.h
@@ -1869,6 +1869,27 @@ LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count);
const char *LLVMGetMDString(LLVMValueRef V, unsigned* Len);
/**
+ * Obtain the number of operands from an MDNode value.
+ *
+ * @param V MDNode to get number of operands from.
+ * @return Number of operands of the MDNode.
+ */
+unsigned LLVMGetMDNodeNumOperands(LLVMValueRef V);
+
+/**
+ * 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.
+ *
+ * @param V MDNode to get the operands from.
+ * @param Dest Destination array for operands.
+ */
+void LLVMGetMDNodeOperands(LLVMValueRef V, LLVMValueRef *Dest);
+
+/**
* @}
*/