search for: parse_bitcode

Displaying 2 results from an estimated 2 matches for "parse_bitcode".

2013 Jan 14
0
[LLVMdev] OCaml binding: error with the function "has_metadata"
...ine 208. Abort trap: 6 I am using the latest 3.2 release from the LLVM download page and this is a small code sample that is crashing, giving the error message above: ************************************ let load_module filename = let mb = Llvm.MemoryBuffer.of_file filename in Llvm_bitreader.parse_bitcode (Llvm.global_context ()) mb let stats m = let print llvalue = if Llvm.has_metadata llvalue then Printf.printf "%s\n%!" (Llvm.value_name llvalue) in Llvm.iter_functions print m let _ = let m = load_module Sys.argv.(1) in stats m ************************...
2011 Jun 11
0
[LLVMdev] Kaleidoscope Build Error
...ested in using your llvm ocaml bindings, but I'm having some > problems getting my code to link with it. I couldn't find a mailing list or > anything like that to ask this question on. I've got a very simple main > program: > > let load_bc ctx path = >   Llvm_bitreader.parse_bitcode ctx (Llvm.MemoryBuffer.of_file path) > > let main () = >   let ctx = Llvm.create_context () in >   let m = load_bc ctx "examples/nweb/nweb.bc" in >   print_string "loaded module successfully" > > and I'm trying to build it using this command (it's in...