LLVM C bindings

XML-RPC assumes you want an external server, or it can be used from
the same process?

If SWIG is not mature enough, and/or doesn't provide the needed level
of flexibility, we have other options:
* write a llc backend that generates C-bindings for C++ compiled code
(general solution, could replace SWIG).
* write a perl script that parses nm output from LLVM libraries and
creates the binding code.

Maybe I'll try one of those approaches when I have time... Do we have
coding conventions in LLVM to distinguish private methods from public
methods in classes, in order to easily identify which methods should
be exported?

Corrado

> An XML-RPC API would be trivial to use and extend from languages like
> OCaml and Python and the interface code should not require any
> maintenance at all.

XML-RPC assumes you want an external server, or it can be used from
the same process?

You can do it entirely in process by passing strings. This requires a minimal
C API at either end and autogenerated serialization code.

If SWIG is not mature enough, and/or doesn't provide the needed level
of flexibility, we have other options:

* write a llc backend that generates C-bindings for C++ compiled code
(general solution, could replace SWIG).

Metaprogramming using LLVM itself is certainly the best way forward in the
long term (IMHO) but it would be much more alluring if Clang could compile
LLVM itself...

In the mean time, I think it would probably be much easier to reuse some
existing tools for C++. Surely there are some mature tools to expose a C++
API in a language agnostic way?!