Adapting Kalaidoscope tutorial for use with LLVM.NET/LLVM-F#?

Hi,

I have decided against coding my planned Braceless compiler in C++ and have instead opted for using the .NET bindings that Keith Shephard have made using F# (a .NET language). This leads to two questions:

  1. Is it okay if I adapt the Kalaidoscope tutorial to C# and we include the adapted version in the LLVM.NET distro and on the LLVM.NET website? I have written very clearly that Chris Lattner wrote the article and that I am to be contacted in case of errors (as they are surely mine), but I’d like your formal approval of the idea. Basically, I am going to redo the sample code in C# and then achieve the same goal that Chris achieves: To illustrate how easy LLVM is to use. As for the actual article text, I am planning on using Chris’ words as unmodfied as I can do (all occurences of C++ being replaced by C# and so forth).

  2. LLVM.NET/LLVM-F# uses the C API. Are there anything important missing from this API, things that are only accessible through the C API?

Cheers,
Mikael

Hi Mikael,

    2. LLVM.NET/LLVM-F# <http://LLVM.NET/LLVM-F#> uses the C API. Are there
anything important missing from this API, things that are only accessible
through the C API?

there's lots missing from the C API because functionality is added when someone
needs it. In the other direction, there's nothing the C binding can do that
the C++ API can't as far as I know. That's not to say that the C binding maps
directly onto the C++ API, some methods map to a sequence of C++ calls.

Ciao, Duncan

Hi, Does any documentation exist (or maybe could someone give an
overview) on what kind of stuff we're missing out on by binding to the
C API? I'd be really interested to know.

Thank you,
Keith

Hi Keith,

Hi, Does any documentation exist (or maybe could someone give an
overview) on what kind of stuff we're missing out on by binding to the
C API? I'd be really interested to know.

the C++ API (in include/llvm/) is definitive. You can rummage around in there
to find out what functionality exists.

Ciao, Duncan.