[LLVMdev] LLVM C bindings

Paul Melis llvm at assumetheposition.nl
Mon Feb 16 12:04:38 PST 2009


Corrado Zoccolo wrote:
> Unfortunately, it seems that llvm-c interface lacks major
> functionalities, e.g. getting a pointer to a jit-ted function.
> It is easy to write a small c++ wrapper to expose the functionality
> that one wants (llvm-py does it for the many optimization passes not
> available through c binding), but I wonder if it is possible to have a
> simpler & cleaner solution, i.e. automatically generating C bindings
> from c++ classes.
>   
SWIG (www.swig.org) recently added a C output mode, that is capable of
generating a C API for a C++ one.
It was a Summer of Code project, so I'm not sure how mature it is. The
docs are here:
http://swig.svn.sourceforge.net/viewvc/swig/branches/gsoc2008-maciekd/Doc/Manual/C.html

Regards,
Paul



More information about the llvm-dev mailing list