1 (*===-- llvm_bitreader.mli - LLVM Ocaml Interface ---------------*- C++ -*-===*
3 * The LLVM Compiler Infrastructure
5 * This file was developed by Gordon Henriksen and is distributed under the
6 * University of Illinois Open Source License. See LICENSE.TXT for details.
8 *===----------------------------------------------------------------------===
10 * This interface provides an ocaml API for the LLVM bitcode reader, the
11 * classes in the Bitreader library.
13 *===----------------------------------------------------------------------===*)
16 type bitreader_result =
17 | Bitreader_success of Llvm.llmodule
18 | Bitreader_failure of string
21 (** [read_bitcode_file path] reads the bitcode for module [m] from the file at
22 [path]. Returns [Reader_success m] if successful, and [Reader_failure msg]
23 otherwise, where [msg] is a description of the error encountered. **)
24 external read_bitcode_file : string -> bitreader_result
25 = "llvm_read_bitcode_file"