[llvm-commits] [PATCH] Add the rest of the C and Ocaml bindings to for the tutorial

Erick Tryzelaar idadesub at users.sourceforge.net
Wed Mar 19 00:50:36 PDT 2008


On Tue, Mar 18, 2008 at 9:20 PM, Gordon Henriksen
<gordonhenriksen at mac.com> wrote:
> (* This is strictly redundant to position_before and position_at_end. *)
> val position_builder : llbuilder -> llbasicblock -> llvalue option

I've got most of these implemented, but I'm not sure about this
interface. In the kaleidoscope mandlebrot example, I'm setting the
builder at the start and end of blocks that don't have any
instructions in them yet. I'm not sure if "option" is expressive
enough to handle this. What do you think about creating the interface
like this?

type position =
  | First
  | Last
  | Before of llvalue
  | After of llvalue
val position_builder : llbuilder -> llbasicblock -> position -> unit

Also, if we exposed an opaque handles to the instruction iterator, we
could make iter_* a little more efficient.



More information about the llvm-commits mailing list