<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" href="style.css" type="text/css"> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <link rel="Start" href="index.html"> <link rel="previous" href="Llvm_bitreader.html"> <link rel="next" href="Llvm_executionengine.html"> <link rel="Up" href="index.html"> <link title="Index of types" rel=Appendix href="index_types.html"> <link title="Index of exceptions" rel=Appendix href="index_exceptions.html"> <link title="Index of values" rel=Appendix href="index_values.html"> <link title="Index of modules" rel=Appendix href="index_modules.html"> <link title="Llvm" rel="Chapter" href="Llvm.html"> <link title="Llvm_analysis" rel="Chapter" href="Llvm_analysis.html"> <link title="Llvm_bitreader" rel="Chapter" href="Llvm_bitreader.html"> <link title="Llvm_bitwriter" rel="Chapter" href="Llvm_bitwriter.html"> <link title="Llvm_executionengine" rel="Chapter" href="Llvm_executionengine.html"> <link title="Llvm_ipo" rel="Chapter" href="Llvm_ipo.html"> <link title="Llvm_scalar_opts" rel="Chapter" href="Llvm_scalar_opts.html"> <link title="Llvm_target" rel="Chapter" href="Llvm_target.html"><title>Llvm_bitwriter</title> </head> <body> <div class="navbar"><a class="pre" href="Llvm_bitreader.html" title="Llvm_bitreader">Previous</a> <a class="up" href="index.html" title="Index">Up</a> <a class="post" href="Llvm_executionengine.html" title="Llvm_executionengine">Next</a> </div> <h1>Module <a href="type_Llvm_bitwriter.html">Llvm_bitwriter</a></h1> <pre><span class="keyword">module</span> Llvm_bitwriter: <code class="code"><span class="keyword">sig</span></code> <a href="Llvm_bitwriter.html">..</a> <code class="code"><span class="keyword">end</span></code></pre>Bitcode writer. <p> This interface provides an ocaml API for the LLVM bitcode writer, the classes in the Bitwriter library.<br> <hr width="100%"> <pre><span id="VALwrite_bitcode_file"><span class="keyword">val</span> write_bitcode_file</span> : <code class="type"><a href="Llvm.html#TYPEllmodule">Llvm.llmodule</a> -> string -> bool</code></pre><div class="info"> <code class="code">write_bitcode_file m path</code> writes the bitcode for module <code class="code">m</code> to the file at <code class="code">path</code>. Returns <code class="code"><span class="keyword">true</span></code> if successful, <code class="code"><span class="keyword">false</span></code> otherwise.<br> </div> <pre><span id="VALwrite_bitcode_to_fd"><span class="keyword">val</span> write_bitcode_to_fd</span> : <code class="type">?unbuffered:bool -> <a href="Llvm.html#TYPEllmodule">Llvm.llmodule</a> -> Unix.file_descr -> bool</code></pre><div class="info"> <code class="code">write_bitcode_to_fd ~unbuffered fd m</code> writes the bitcode for module <code class="code">m</code> to the channel <code class="code">c</code>. If <code class="code">unbuffered</code> is <code class="code"><span class="keyword">true</span></code>, after every write the fd will be flushed. Returns <code class="code"><span class="keyword">true</span></code> if successful, <code class="code"><span class="keyword">false</span></code> otherwise.<br> </div> <pre><span id="VALoutput_bitcode"><span class="keyword">val</span> output_bitcode</span> : <code class="type">?unbuffered:bool -> Pervasives.out_channel -> <a href="Llvm.html#TYPEllmodule">Llvm.llmodule</a> -> bool</code></pre><div class="info"> <code class="code">output_bitcode ~unbuffered c m</code> writes the bitcode for module <code class="code">m</code> to the channel <code class="code">c</code>. If <code class="code">unbuffered</code> is <code class="code"><span class="keyword">true</span></code>, after every write the fd will be flushed. Returns <code class="code"><span class="keyword">true</span></code> if successful, <code class="code"><span class="keyword">false</span></code> otherwise.<br> </div> </body></html>