[llvm] [LLVM-C] Support operand bundles (PR #73914)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 7 08:14:39 PST 2023


================
@@ -3000,6 +3000,83 @@ LLVMValueRef LLVMMDNodeInContext(LLVMContextRef C, LLVMValueRef *Vals,
 /** Deprecated: Use LLVMMDNodeInContext2 instead. */
 LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count);
 
+/**
+ * @}
+ */
+
+/**
+ * @defgroup LLVMCCoreOperandBundle Operand Bundles
+ *
+ * Functions in this group operate on LLVMOperandBundleRef instances that
+ * correspond to llvm::OperandBundleDef instances.
+ *
+ * @see llvm::OperandBundleDef
+ *
+ * @{
+ */
+
+/**
+ * Create a new operand bundle.
+ *
+ * Every invocation should be paired with LLVMDisposeOperandBundle() or memory
+ * will be leaked.
+ *
+ * @param Tag Tag name of the operand bundle
+ * @param TagLen Length of Tag
+ * @param Args Memory address of an array of bundle operands
+ * @param NumArgs Length of Args
+ */
+LLVMOperandBundleRef LLVMCreateOperandBundle(const char *Tag, unsigned TagLen,
----------------
nikic wrote:

```suggestion
LLVMOperandBundleRef LLVMCreateOperandBundle(const char *Tag, size_t TagLen,
```
To match LLVMGetOperandBundleTag.

https://github.com/llvm/llvm-project/pull/73914


More information about the llvm-commits mailing list