beginner questions about using llvm from a host program

Hi..

I'm working on a game engine, right now we support a couple of
scripting languages (lua, squirrel, python) and we're looking into
llvm as another option. I have some beginner questions about how to
use it.

What we usually do is: when something uses a script, we load it (if
it's not loaded already). the script usually returns a class that we
use to create instances that we associate with the c++ object. When an
event arrives for the object, we search for the event handler function
on the instance and call into it. Are there any llvm examples or
documentation of this type of usage? What APIs should I be looking
for? I found "ExecutionEngine" and friends on the doxygen files, but
I'm not clear on all the details of how to use it.

Also, if we compile C code (using llvm-gcc) that includes headers from
our engine, what happens to the calls that go into our code? If we can
"capture" them all on a function and get void pointers to all the
parameters, we can pass the call to our code (unless llvm already
knows how to do this, but then we'd have to export all the symbols on
the host binary?) Is that possible?

Thanks.

Ariel.