Adding Ocaml bindings for the bitreader as requested by Sarah
[oota-llvm.git] / bindings / ocaml / bitreader / llvm_bitreader.mli
1 (*===-- llvm_bitreader.mli - LLVM Ocaml Interface ---------------*- C++ -*-===*
2  *
3  *                     The LLVM Compiler Infrastructure
4  *
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.
7  *
8  *===----------------------------------------------------------------------===
9  *
10  * This interface provides an ocaml API for the LLVM bitcode reader, the
11  * classes in the Bitreader library.
12  *
13  *===----------------------------------------------------------------------===*)
14
15
16 type bitreader_result =
17 | Bitreader_success of Llvm.llmodule
18 | Bitreader_failure of string
19
20
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"