Land the long talked about "type system rewrite" patch. This
[llvm/stm8.git] / bindings / ocaml / bitwriter / llvm_bitwriter.ml
blob3e69a3cc8fbba799571cf1d0999a5717b75334b5
1 (*===-- llvm_bitwriter.ml - LLVM Ocaml Interface ----------------*- C++ -*-===*
3 * The LLVM Compiler Infrastructure
5 * This file is distributed under the University of Illinois Open Source
6 * License. See LICENSE.TXT for details.
8 *===----------------------------------------------------------------------===
10 * This interface provides an ocaml API for the LLVM intermediate
11 * representation, the classes in the VMCore library.
13 *===----------------------------------------------------------------------===*)
16 (* Writes the bitcode for module the given path. Returns true if successful. *)
17 external write_bitcode_file : Llvm.llmodule -> string -> bool
18 = "llvm_write_bitcode_file"
20 external write_bitcode_to_fd : ?unbuffered:bool -> Llvm.llmodule
21 -> Unix.file_descr -> bool
22 = "llvm_write_bitcode_to_fd"
24 let output_bitcode ?unbuffered channel m =
25 write_bitcode_to_fd ?unbuffered m (Unix.descr_of_out_channel channel)