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