<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm/bindings/Makefile, branch master</title>
<subtitle>http://llvm.org</subtitle>
<id>https://git.amat.us/llvm/atom/bindings/Makefile?h=master</id>
<link rel='self' href='https://git.amat.us/llvm/atom/bindings/Makefile?h=master'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/'/>
<updated>2007-12-29T20:11:13Z</updated>
<entry>
<title>remove attributions from the rest of the llvm makefiles.</title>
<updated>2007-12-29T20:11:13Z</updated>
<author>
<name>Chris Lattner</name>
<email>sabre@nondot.org</email>
</author>
<published>2007-12-29T20:11:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=57360d1f1cede3b26744d0ce3ade814fcc0f332d'/>
<id>urn:sha1:57360d1f1cede3b26744d0ce3ade814fcc0f332d</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45416 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>Add explicit --enable-bindings option to configure.</title>
<updated>2007-10-02T09:50:18Z</updated>
<author>
<name>Gordon Henriksen</name>
<email>gordonhenriksen@mac.com</email>
</author>
<published>2007-10-02T09:50:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=6530e9d8e6dfc8f16fe509701967e4ade99fae6c'/>
<id>urn:sha1:6530e9d8e6dfc8f16fe509701967e4ade99fae6c</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42526 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
<entry>
<title>Adding ocaml language bindings for the vmcore and bitwriter libraries. These are</title>
<updated>2007-09-18T12:49:39Z</updated>
<author>
<name>Gordon Henriksen</name>
<email>gordonhenriksen@mac.com</email>
</author>
<published>2007-09-18T12:49:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/llvm/commit/?id=8ef426baa36639458f6777309db25c1768dc9c8a'/>
<id>urn:sha1:8ef426baa36639458f6777309db25c1768dc9c8a</id>
<content type='text'>
built atop the C language bindings, and user programs can link with them as 
such:

  # Bytecode
  ocamlc -cc g++ llvm.cma llvmbitwriter.cma -o example example.ml
  # Native
  ocamlopt -cc g++ llvm.cmxa llvmbitwriter.cmxa -o example.opt example.ml

The vmcore.ml test exercises most/all of the APIs thus far bound. Unfortunately,
they're not yet numerous enough to write hello world. But:

  $ cat example.ml
  (* example.ml *)
  
  open Llvm
  open Llvm_bitwriter
  
  let _ =
    let filename = Sys.argv.(1) in
    let m = create_module filename in
    
    let v = make_int_constant i32_type 42 false in
    let g = define_global "hello_world" v m in
    
    if not (write_bitcode_file m filename) then exit 1;
    
    dispose_module m;

  $ ocamlc -cc g++ llvm.cma llvm_bitwriter.cma -o example example.ml
  File "example.ml", line 11, characters 6-7:
  Warning Y: unused variable g.
  $ ./example example.bc
  $ llvm-dis &lt; example.bc
  ; ModuleID = '&lt;stdin&gt;'
  @hello_world = global i32 42            ; &lt;i32*&gt; [#uses=0]

The ocaml test cases provide effective tests for the C interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42093 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
</entry>
</feed>
