1*9880d681SAndroid Build Coastguard Worker(*===-- llvm_bitwriter.ml - 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 * This interface provides an OCaml API for the LLVM intermediate 11*9880d681SAndroid Build Coastguard Worker * representation, the classes in the VMCore library. 12*9880d681SAndroid Build Coastguard Worker * 13*9880d681SAndroid Build Coastguard Worker *===----------------------------------------------------------------------===*) 14*9880d681SAndroid Build Coastguard Worker 15*9880d681SAndroid Build Coastguard Workerexternal write_bitcode_file 16*9880d681SAndroid Build Coastguard Worker : Llvm.llmodule -> string -> bool 17*9880d681SAndroid Build Coastguard Worker = "llvm_write_bitcode_file" 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Workerexternal write_bitcode_to_fd 20*9880d681SAndroid Build Coastguard Worker : ?unbuffered:bool -> Llvm.llmodule -> Unix.file_descr -> bool 21*9880d681SAndroid Build Coastguard Worker = "llvm_write_bitcode_to_fd" 22*9880d681SAndroid Build Coastguard Worker 23*9880d681SAndroid Build Coastguard Workerexternal write_bitcode_to_memory_buffer 24*9880d681SAndroid Build Coastguard Worker : Llvm.llmodule -> Llvm.llmemorybuffer 25*9880d681SAndroid Build Coastguard Worker = "llvm_write_bitcode_to_memory_buffer" 26*9880d681SAndroid Build Coastguard Worker 27*9880d681SAndroid Build Coastguard Workerlet output_bitcode ?unbuffered channel m = 28*9880d681SAndroid Build Coastguard Worker write_bitcode_to_fd ?unbuffered m (Unix.descr_of_out_channel channel) 29