[LLVMdev] runtime library for jitted code
Victor Zverovich
victor.zverovich at googlemail.com
Tue Jun 16 09:57:54 PDT 2009
Hi,
The question about the name mangling gave me an idea that it can be used to
automate registration of DLL functions. Instead of manually creating
Function objects specifying a return type and argument types which is
error-prone and time-consuming one can get a list of functions exported from
a DLL using Windows API, demangle each name and construct a Function object
from it. Is there any support for Visual C++ style (de)mangling in LLVM or
related project? In any case I think it won't be difficult for me to write
such a converter from mangled names to LLVM function declarations.
Best regards,
Victor
2009/6/15 Óscar Fuentes <ofv at wanadoo.es>
> Albert Graef <Dr.Graef at t-online.de> writes:
>
> > Victor Zverovich wrote:
> >> I am considering a possibility of using LLVM JIT for an algebraic
> >> modelling language. I have already done some prototyping following the
> >> Kaleidoscope tutorial and currently thinking of how to connect the
> >> jitted code to a runtime library (for this language) which I would like
> >> to code in C++. If it was *NIX I would use g++ possibly with '-rdynamic'
> >> option as suggested in the tutorial to resolve required functions at
> >> runtime. However it is not an option, I am stuck to Windows and Visual
> >> C++.
> >
> > Well, backlinking doesn't work on Windows, but you can create a dll for
> > your runtime and use LLVM's dynamic library interface to load that dll.
> > I'm doing it that way in my project (http://pure-lang.googlecode.com/,
> > search for 'sys::DynamicLibrary::' in interpreter.cc) and it works fine
> > on Windows.
>
> The OP says that he wants to link to a dll coded in C++. Isn't name
> mangling the main problem here?
>
> --
> Óscar
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090616/06c8d420/attachment.html>
More information about the llvm-dev
mailing list