Merge pull request #68 from davipo/master

Fix corrupted text and example in section 7.3 of docs / source / doc / kaleidoscope
This commit is contained in:
Siu Kwan Lam 2013-04-11 10:35:14 -07:00
commit 777eea719c
2 changed files with 335 additions and 334 deletions

View file

@ -133,11 +133,11 @@ instruction <http://www.llvm.org/docs/LangRef.html#i_alloca>`_:
define i32 @example() { define i32 @example() {
entry: entry:
%X = alloca i32 ; type of %X is i32 *. %X = alloca i32 ; type of %X is i32*
... ...
%tmp = load i32* %X ; load the stack value %X from the stack. %tmp = load i32* %X ; load the stack value %X from the stack
%tmp2 = add i32 %tmp, 1 ; increment it store i32 %tmp2, %tmp2 = add i32 %tmp, 1 ; increment it
i32* %X ; store it back store i32 %tmp2, i32* %X ; store it back
... ...

View file

@ -26,14 +26,15 @@ some examples:
tr = Type.float() tr = Type.float()
r1 = Constant.real(tr, "3.141592") # create from a string r2 = r1 = Constant.real(tr, "3.141592") # create from a string
Constant.real(tr, 1.61803399) # create from a Python float {% r2 = Constant.real(tr, 1.61803399) # create from a Python float
endhighlight %}
# llvm.core.Constant # llvm.core.Constant
- This will become a table of contents (this text will be scraped). - This will become a table of contents (this text will be scraped).
{:toc} {:toc}
Static factory methods Static factory methods
---------------------- ----------------------