[llvm-commits] [PATCH] OCaml/C bindings updates

Török Edwin edwintorok at gmail.com
Wed Oct 5 06:12:20 PDT 2011


Hi,

Attached is a series of patches to bring the OCaml bindings in sync with the C bindings,
they are mostly trivial changes.

Even with these patches there are some C bindings that are not yet exposed in the OCaml bindings
for various reasons, I will try to add more bindings as I find them.

Some patches also add C bindings: LLVMTypeIsSized, LLVMGetStructName,
LLVMGetInstructionOpcode, LLVMGetICmpPredicate,
LLVMGetMDString, LLVMGetMDNumOperands, LLVMGetMDNodeOperand, LLVMGetNamedMetadataNumOperands,
LLVMGetNamedMetadataOperands.
These allow the OCaml bindings to be usable for analyzing LLVM IR, not just emitting LLVM IR.

These are the trivial patches, I intend to commit them (after compile-testing each) unless there are objections:
0001-add-tests.patch
0002-Don-t-require-C-bindings-opcode-numbers-to-be-kept-i.patch
0005-ocaml-bindings-add-llvm_ipo-based-on-IPO.h.patch
0007-C-OCaml-API-to-retrieve-struct-name.patch
0009-ocaml-C-bindings-getmdstring-add-num_op-get_op-shoul.patch
0010-add-binding-to-read-icmp-predicate.patch
0011-ocaml-C-bindings-type-isSized.patch
0013-Add-uwtable-returnstwice-and-nonlazybind-to-the-C-bi.patch

These patches are somewhat larger, but mostly mechanical. Wouldn't hurt if someone else double-checkes them though:
0003-ocaml-bindings-add-getopcode-for-constant-and-instru.patch
0014-OCaml-bindings-add-some-missing-functions-and-testca.patch

And finally these are the patches which would need review:

0004-ocaml-bindings-introduce-classify_value.patch
0006-ocaml-bindings-add-findlib-META-support.patch
0008-fix-infinite-recursion-on-string_of_lltype.patch
0012-OCaml-bindings-fix-attributes-to-use-all-32-bits.patch

Best regards,
--Edwin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-add-tests.patch
Type: text/x-patch
Size: 11031 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111005/fa746572/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Don-t-require-C-bindings-opcode-numbers-to-be-kept-i.patch
Type: text/x-patch
Size: 3493 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111005/fa746572/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-ocaml-bindings-add-getopcode-for-constant-and-instru.patch
Type: text/x-patch
Size: 9087 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111005/fa746572/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-ocaml-bindings-introduce-classify_value.patch
Type: text/x-patch
Size: 8057 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111005/fa746572/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-ocaml-bindings-add-llvm_ipo-based-on-IPO.h.patch
Type: text/x-patch
Size: 13711 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111005/fa746572/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-ocaml-bindings-add-findlib-META-support.patch
Type: text/x-patch
Size: 4459 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111005/fa746572/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-C-OCaml-API-to-retrieve-struct-name.patch
Type: text/x-patch
Size: 4030 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111005/fa746572/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-fix-infinite-recursion-on-string_of_lltype.patch
Type: text/x-patch
Size: 2043 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111005/fa746572/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-ocaml-C-bindings-getmdstring-add-num_op-get_op-shoul.patch
Type: text/x-patch
Size: 6663 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111005/fa746572/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0010-add-binding-to-read-icmp-predicate.patch
Type: text/x-patch
Size: 3523 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111005/fa746572/attachment-0009.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0011-ocaml-C-bindings-type-isSized.patch
Type: text/x-patch
Size: 3280 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111005/fa746572/attachment-0010.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0012-OCaml-bindings-fix-attributes-to-use-all-32-bits.patch
Type: text/x-patch
Size: 12315 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111005/fa746572/attachment-0011.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0013-Add-uwtable-returnstwice-and-nonlazybind-to-the-C-bi.patch
Type: text/x-patch
Size: 862 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111005/fa746572/attachment-0012.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0014-OCaml-bindings-add-some-missing-functions-and-testca.patch
Type: text/x-patch
Size: 32243 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111005/fa746572/attachment-0013.bin>


More information about the llvm-commits mailing list