Update llvm-py to llvmpy and fix more docs

This commit is contained in:
Travis E. Oliphant 2012-08-09 01:16:36 -05:00
commit 75ca0289b5
11 changed files with 49 additions and 56 deletions

View file

@ -29,12 +29,12 @@ will teach you a little bit about how LLVM does things, as well as
demonstrate how easy it is to use. It's much more work to build a lexer
and parser than it is to generate LLVM IR code. :)
**Please note**: the code in this chapter and later requires llvm-py 0.6
**Please note**: the code in this chapter and later requires llvmpy 0.6
and LLVM 2.7. Earlier versions will most likely not work with it. Also
note that you need to use a version of this tutorial that matches your
llvm-py release: If you are using an official llvm-py release, use the
version of the documentation on the `llvm-py examples
page <http://www.mdevan.org/llvm-py/examples.html>`_
llvmpy release: If you are using an official llvm-py release, use the
version of the documentation on the `llvmpy examples
page <http://www.mdevan.org/llvmpy/examples.html>`_
--------------
@ -128,7 +128,7 @@ First we'll do numeric literals:
{% highlight python %} def CodeGen(self): return
Constant.real(Type.double(), self.value) {% endhighlight %}
In llvm-py, floating point numeric constants are represented with the
In llvmpy, floating point numeric constants are represented with the
``llvm.core.ConstantFP`` class. To create one, we can use the static
``real()`` method in the ``llvm.core.Constant`` class. This code
basically just creates and returns a ``ConstantFP``. Note that in the
@ -514,7 +514,7 @@ Full Code Listing # {#code}
===========================
Here is the complete code listing for our running example, enhanced with
the LLVM code generator. Because this uses the llvm-py libraries, you
the LLVM code generator. Because this uses the llvmpy libraries, you
need to `download <../download.html>`_ and
`install <../userguide.html#install>`_ them.

View file

@ -329,7 +329,7 @@ Now we can load this library into the Python process using
to produce simple output to the console:
{% highlight python %} >>> import llvm.core >>>
llvm.core.load\_library\_permanently('/home/max/llvm-py-tutorial/putchard.so')
llvm.core.load\_library\_permanently('/home/max/llvmpy-tutorial/putchard.so')
>>> import kaleidoscope >>> kaleidoscope.main() ready> extern
putchard(x) Read an extern: declare double @putchard(double)