Hi,<div><br></div><div>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.</div>
<div><br></div><div>Best regards,</div><div>Victor<br><br><div class="gmail_quote">2009/6/15 Óscar Fuentes <span dir="ltr"><<a href="mailto:ofv@wanadoo.es">ofv@wanadoo.es</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Albert Graef <<a href="mailto:Dr.Graef@t-online.de">Dr.Graef@t-online.de</a>> writes:<br>
<br>
> Victor Zverovich wrote:<br>
>> I am considering a possibility of using LLVM JIT for an algebraic<br>
>> modelling language. I have already done some prototyping following the<br>
>> Kaleidoscope tutorial and currently thinking of how to connect the<br>
>> jitted code to a runtime library (for this language) which I would like<br>
>> to code in C++. If it was *NIX I would use g++ possibly with '-rdynamic'<br>
>> option as suggested in the tutorial to resolve required functions at<br>
>> runtime. However it is not an option, I am stuck to Windows and Visual<br>
>> C++.<br>
><br>
> Well, backlinking doesn't work on Windows, but you can create a dll for<br>
> your runtime and use LLVM's dynamic library interface to load that dll.<br>
> I'm doing it that way in my project (<a href="http://pure-lang.googlecode.com/" target="_blank">http://pure-lang.googlecode.com/</a>,<br>
> search for 'sys::DynamicLibrary::' in interpreter.cc) and it works fine<br>
> on Windows.<br>
<br>
</div>The OP says that he wants to link to a dll coded in C++. Isn't name<br>
mangling the main problem here?<br>
<br>
--<br>
<font color="#888888">Óscar<br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</div></div></blockquote></div><br></div>