1 (*===-- llvm_irreader.mli - LLVM OCaml Interface --------------*- OCaml -*-===*
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 *===----------------------------------------------------------------------===*)
12 This interface provides an OCaml API for the LLVM assembly reader, the
13 classes in the IRReader library. *)
15 exception Error of string
17 (** [parse_ir context mb] parses the IR 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::ParseIR]. *)
21 val parse_ir : Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule