<font size=2 face="sans-serif">Hello LLVM-World,</font>
<br>
<br><font size=2 face="sans-serif">I always thought, that clang is just
a normal C/C++ Compiler, but after some research I'm getting a little confused.
Do I'm right with the following?<br>
<br>
I have a simple C/C++ program and I compile it with clang.<br>
<br>
1.) Clang generates me a LLVM IR file<br>
2.) LLVM uses the IR file to generate the.obj file<br>
3.) My linker creates an executebale file from that.<br>
<br>
Is this correct? On Stackoverflow (</font><a href="http://stackoverflow.com/questions/3509215/llvm-jit-and-native"><font size=2 color=blue face="sans-serif">http://stackoverflow.com/questions/3509215/llvm-jit-and-native</font></a><font size=2 face="sans-serif">)
I read:<br>
</font>
<table width=100% style="border-collapse:collapse;">
<tr valign=top height=8>
<td width=100% style="border-style:solid solid solid solid;border-color:#000000;border-width:1px 1px 1px 1px;padding:0px 0px;"><font size=3>So
how does one use LLVM as a JIT compiler? </font>
<br><font size=3>You build an application which generates some LLVM IR
(in memory), then use the LLVM library to generate native code (still in
memory). LLVM hands you back a pointer which you can call afterwards. No
clang involved. </font></table>
<br>
<br><font size=2 face="sans-serif">So... Is it possible to grab the IR-File
clang created and load them into a normal C/C++ written program? Could
this program now use the LLVM-Library to create functions from it and let
me call them? So this would be like a dll/so?  How could you perform
this? What would happen if I'm using a function like printf? So the created
code must have a "undefined reference".</font>
<br>
<br><font size=2 face="sans-serif">Kind regards <br>
Björn<br>
Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr.
DE 114 165 789<br>
Geschäftsführer: Hiroshi Kawamura, Dr Hiroshi Nakamura, Markus Bode, Heiko
Lampert, Takashi Nagano, Takeshi Fukushima.</font>