source: parabix-LLVM/llvm_git/bindings/ocaml/bitreader/llvm_bitreader.mli @ 4078

Last change on this file since 4078 was 4078, checked in by linmengl, 5 years ago

checkin llvm-meng source

File size: 1.2 KB
Line 
1(*===-- llvm_bitreader.mli - LLVM OCaml Interface ---------------*- C++ -*-===*
2 *
3 *                     The LLVM Compiler Infrastructure
4 *
5 * This file is distributed under the University of Illinois Open Source
6 * License. See LICENSE.TXT for details.
7 *
8 *===----------------------------------------------------------------------===*)
9
10(** Bitcode reader.
11
12    This interface provides an OCaml API for the LLVM bitcode reader, the
13    classes in the Bitreader library. *)
14
15exception Error of string
16
17(** [get_module context mb] reads the bitcode for a new module [m] from the
18    memory buffer [mb] in the context [context].  Returns [m] if successful, or
19    raises [Error msg] otherwise, where [msg] is a description of the error
20    encountered. See the function [llvm::getBitcodeModule]. *)
21val get_module : Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule
22
23
24(** [parse_bitcode context mb] parses the bitcode for a new module [m] from the
25    memory buffer [mb] in the context [context]. Returns [m] if successful, or
26    raises [Error msg] otherwise, where [msg] is a description of the error
27    encountered. See the function [llvm::ParseBitcodeFile]. *)
28val parse_bitcode : Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule
Note: See TracBrowser for help on using the repository browser.