[LLVMdev] Status of ocaml bindings
jason.johnson.081 at gmail.com
Mon Jul 26 12:20:23 PDT 2010
Ok, thanks for your answer. I'm just looking to mostly do the front
end like is in the tutorial (plus some H&M type inference, but I
suppose llvm itself probably wont help much with that) so it sounds
like Ocaml could be enough for what I need.
On Mon, Jul 26, 2010 at 5:32 PM, Jianzhou Zhao <jianzhou at seas.upenn.edu> wrote:
> On Mon, Jul 26, 2010 at 10:15 AM, Jason Johnson
> <jason.johnson.081 at gmail.com> wrote:
>> Hello list,
>> Since reading the kaleidoscope tutorial I have decided to play around with creating a language I've had in the back of my mind for some time. I would prefer not to write the front end in c or c++ though if it can be avoided. I read online that the ocaml bindings are distributed with llvm but are not always as up to date as the c or c++ bindings. Is this (still) the case? Is there anything that the c/c++ bindings can do that the ocaml ones cannot?
> The C++ objects (values, instructions, modules, ...) are opaque in
> OCaml. To program them, we need to use the wrapped C++ interfaces for
> these objects if there were, and we cannot 'pattern-match' these
> objects. For example, the current OCaml bindings can let us build a
> LLVM IR (the high-level source language can be translated into LLVM IR
> with these interfaces), call any existing analysis or transformations.
> To design a new pass in OCaml, it might need to expose more C++
> primitives, so it is more convenient to program in C++ once we can
> build IR from the source language with OCaml bindings. But I don't
> know if there is an better way to expose C++ to OCaml.
>> Thanks sincerely for your help,
>> Sent from my iPad
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev