[llvm-commits] [PATCH] Expose ExecutionEngine::getTargetData() to c and ocaml bindings.

Gordon Henriksen gordonhenriksen at mac.com
Wed Mar 26 04:09:52 PDT 2008


On 2008-03-25, at 23:14, Erick Tryzelaar wrote:

> This implements the suggestions gordonh made. Is the the test  
> acceptable?

It's actually much more aggressive than necessary. ;) Also, since your  
binding is in Llvm_executionengine.mli, the test should likewise be in  
executionengine.ml. No need to slurp over target.ml into ee.ml,  
though; this is about as much as is useful:

(* Show that the binding links and runs. *)
let t = ExecutionEngine.target_data ee in

(* Demonstrate that a garbage pointer wasn't returned. *)
insist (let ty = intptr_type t in ty = i32_type or ty = i64_type);

The former is particularly important for maintenance.

Please commit after making these changes.

Thanks!
— Gordon





More information about the llvm-commits mailing list