summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-09-19 20:29:39 +0000
committerDuncan Sands <baldrick@free.fr>2012-09-19 20:29:39 +0000
commit12ccbe7a8e356bc1a52e5f7ded532e3a62379053 (patch)
tree86183476c5af950def06fea8e9cee144e2feb42b /llvm/include/llvm-c
parent242ed3158a033b4568e33a337934f884f9108a37 (diff)
downloadbcm5719-llvm-12ccbe7a8e356bc1a52e5f7ded532e3a62379053.tar.gz
bcm5719-llvm-12ccbe7a8e356bc1a52e5f7ded532e3a62379053.zip
Add support for accessing an MDNode's operands via the C binding. Patch by
Anthony Bryant. llvm-svn: 164247
Diffstat (limited to 'llvm/include/llvm-c')
-rw-r--r--llvm/include/llvm-c/Core.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h
index 6587e770800..4d3374958b5 100644
--- a/llvm/include/llvm-c/Core.h
+++ b/llvm/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);
+
+/**
* @}
*/
OpenPOWER on IntegriCloud