1. camlspotter
  2. ocaml-llvm-phantom

Commits

camlspotter  committed 2113c6d

phantomz

  • Participants
  • Parent commits 5784da1
  • Branches default

Comments (0)

Files changed (2)

File lbuilder.ml

View file
  • Ignore whitespace
       : 'ty v m =
     unsafeM (Llvm.build_pointercast !<v !<ty name)
 
-  (* P.unsafe *)
+  (* unsafe *)
   let unsafe_gep 
       ?(name = "gepped")
       (v : 'a pointer v)
       : 'unsafe pointer v m = 
     unsafeM (Llvm.build_gep !<v (Array.of_list (List.map (!<) xs)) name)
 
+  (* gep v (G . ... G) *)
+  type 'a gep
+  let pos _n : [> `container of 'a] gep -> 'a gep = assert false
+  let mem1 : ('a1 * _, Llvm.llvalue) P.ts struct_ gep -> 'a1 gep = assert false
+  let mem2 : (_ * ('a2 * _), Llvm.llvalue) P.ts struct_ gep -> 'a2 gep = assert false
+
   let load 
       ?(name="loaded")
       (v : 'ty pointer v)

File lmodule_intf.ml

View file
  • Ignore whitespace
 
     (** functions from libc *)  
 
-    val malloc : (i32 -> void_pointer) pointer v
-    val free : (void_pointer -> void) pointer v
-    val memcpy : ((void_pointer * void_pointer * i32) -> void_pointer) pointer v
-    val printf : (i8 pointer -> dots -> i32) pointer v
-    val bzero : ((void_pointer * i32) -> void) pointer v
+    val malloc : (i32 tpl1 -> void_pointer) pointer v
+    val free : (void_pointer tpl1 -> void) pointer v
+    val memcpy : ((void_pointer, void_pointer, i32) tpl3 -> void_pointer) pointer v
+    val printf : (i8 pointer tpl1 -> dots -> i32) pointer v
+    val bzero : ((void_pointer, i32) tpl2 -> void) pointer v
   end
 
   module PassManager : sig