[MIParser] Set RegClassOrRegBank during instruction parsing
[llvm-complete.git] / bindings / ocaml / bitwriter / llvm_bitwriter.ml
blob3750a02dcd0e9e1f6f964055fa1503dc381ddc5e
1 (*===-- llvm_bitwriter.ml - LLVM OCaml Interface --------------*- OCaml -*-===*
3 * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 * See https://llvm.org/LICENSE.txt for license information.
5 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 *===----------------------------------------------------------------------===
9 * This interface provides an OCaml API for the LLVM intermediate
10 * representation, the classes in the VMCore library.
12 *===----------------------------------------------------------------------===*)
14 external write_bitcode_file
15 : Llvm.llmodule -> string -> bool
16 = "llvm_write_bitcode_file"
18 external write_bitcode_to_fd
19 : ?unbuffered:bool -> Llvm.llmodule -> Unix.file_descr -> bool
20 = "llvm_write_bitcode_to_fd"
22 external write_bitcode_to_memory_buffer
23 : Llvm.llmodule -> Llvm.llmemorybuffer
24 = "llvm_write_bitcode_to_memory_buffer"
26 let output_bitcode ?unbuffered channel m =
27 write_bitcode_to_fd ?unbuffered m (Unix.descr_of_out_channel channel)