Add the ocaml binding to LLVMBuildAggregateRet.
authorErick Tryzelaar <idadesub@users.sourceforge.net>
Wed, 19 Aug 2009 08:37:00 +0000 (08:37 +0000)
committerErick Tryzelaar <idadesub@users.sourceforge.net>
Wed, 19 Aug 2009 08:37:00 +0000 (08:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79414 91177308-0d34-0410-b5e6-96231b3b80d8

bindings/ocaml/llvm/llvm_ocaml.c

index ccb1b1c..2fea055 100644 (file)
@@ -974,6 +974,12 @@ CAMLprim LLVMValueRef llvm_build_ret(LLVMValueRef Val, value B) {
   return LLVMBuildRet(Builder_val(B), Val);
 }
 
+/* llvalue array -> llbuilder -> llvalue */
+CAMLprim LLVMValueRef llvm_build_aggregate_ret(value RetVals, value B) {
+  return LLVMBuildAggregateRet(Builder_val(B), (LLVMValueRef *) Op_val(RetVals),
+                               Wosize_val(RetVals));
+}
+
 /* llbasicblock -> llbuilder -> llvalue */
 CAMLprim LLVMValueRef llvm_build_br(LLVMBasicBlockRef BB, value B) {
   return LLVMBuildBr(Builder_val(B), BB);