[LLVMdev] LLVM languages cooperation
Sébastien Pierre
sebastien.pierre at adival.com
Tue Feb 24 02:35:01 PST 2004
Hi all,
I am an LLVM newbie, thinking about using LLVM as the platform for a toy
language.
In this respect, I was wondering if LLVM could be used to easily weave
code written in different language. For instance, let's assume I have a
library written in C, some components written in C++ and some components
written in OCaml (we also assume an OCaml backend for LLVM). All this
code gets compiled to LLVM bytecode.
Is there a way, given this bytecode, to access functions and invoke them
uniformly ?
This may sound rather fuzzy, but thinking of .NET could help : .NET
allows to write code in any supported language, the objects and
functions written in these language become available to all supported
languages. This is made possible because there is a common object model
build on top of the .NET VM and bridged to all supported languages. I
know LLVM does not define an object model, but maybe a common function
call model ?
TIA,
-- Sébastien
More information about the llvm-dev
mailing list