[LLVMdev] Python bindings?

Erick Tryzelaar idadesub at users.sourceforge.net
Fri Mar 28 00:57:54 PDT 2008


On Fri, Mar 28, 2008 at 12:00 AM, Mahadevan R <mdevan.foobar at gmail.com> wrote:
>  1)
>  Are the C bindings complete? That is, is there some part of the C++ API
>  that is not exposed by the C API?

Nope, there's still a lot that's not done. Patches are always welcome
:) We've got enough in subversion to implement the Kaleidoscope
tutorial though.

>  2)
>  Do the Ocaml/Haskell bindings follow that language's naming conventions?
>  Or LLVM's? For e.g., in Python method names are usually like_this. So
>  which of these are preferred:
>
>   Builder.set_insert_point()
>
>  or
>
>   Builder.SetInsertPoint()

I can't speak for the haskell bindings, but the ocaml bindings do not.
We use the lowercase/underscore format traditionally used in ocaml
projects. We don't need to bind all of the helper functions and
methods so the api can be kept a little smaller. They also might be
named differently and the semantics can be changed. For instance, the
function "createPromoteMemoryToRegisterPass" creates a Pass object
that we can add to a PassManager, but in ocaml we have
"add_memory_to_register_promotion" which takes a PassManager as an
argument and adds it inside the binding. This makes memory management
a bit simpler.



More information about the llvm-dev mailing list