1*09467b48Spatrick(*===-- llvm_irreader.mli - LLVM OCaml Interface --------------*- OCaml -*-===* 2*09467b48Spatrick * 3*09467b48Spatrick * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*09467b48Spatrick * See https://llvm.org/LICENSE.txt for license information. 5*09467b48Spatrick * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*09467b48Spatrick * 7*09467b48Spatrick *===----------------------------------------------------------------------===*) 8*09467b48Spatrick 9*09467b48Spatrick(** IR reader. 10*09467b48Spatrick 11*09467b48Spatrick This interface provides an OCaml API for the LLVM assembly reader, the 12*09467b48Spatrick classes in the IRReader library. *) 13*09467b48Spatrick 14*09467b48Spatrickexception Error of string 15*09467b48Spatrick 16*09467b48Spatrick(** [parse_ir context mb] parses the IR for a new module [m] from the 17*09467b48Spatrick memory buffer [mb] in the context [context]. Returns [m] if successful, or 18*09467b48Spatrick raises [Error msg] otherwise, where [msg] is a description of the error 19*09467b48Spatrick encountered. See the function [llvm::ParseIR]. *) 20*09467b48Spatrickval parse_ir : Llvm.llcontext -> Llvm.llmemorybuffer -> Llvm.llmodule 21