summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-11-05 19:22:50 +0000
committerChris Lattner <sabre@nondot.org>2007-11-05 19:22:50 +0000
commitcf9893d28cea3b3d541b497ee2a45ee6cf177407 (patch)
tree48cc5eabb667fdc4fac692f194b6cab4e45744e7 /docs
parent99005a4b3b7d4a76e05bf81e8c42c5c39f206f8a (diff)
downloadllvm-cf9893d28cea3b3d541b497ee2a45ee6cf177407.tar.gz
llvm-cf9893d28cea3b3d541b497ee2a45ee6cf177407.tar.bz2
llvm-cf9893d28cea3b3d541b497ee2a45ee6cf177407.tar.xz
clarify why prototype::codegen returns a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43725 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/tutorial/LangImpl3.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/tutorial/LangImpl3.html b/docs/tutorial/LangImpl3.html
index 2e961d2f61..3733a66bfc 100644
--- a/docs/tutorial/LangImpl3.html
+++ b/docs/tutorial/LangImpl3.html
@@ -293,7 +293,13 @@ Function *PrototypeAST::Codegen() {
</pre>
</div>
-<p>This code packs a lot of power into a few lines. The first step is to create
+<p>This code packs a lot of power into a few lines. Note first that this
+function returns a Function* instead of a Value*. Because a "prototype" really
+talks about the external interface for a function (not the value computed by
+an expression), it makes sense for it to return the LLVM Function it corresponds
+to when codegen'd.</p>
+
+<p>The next step is to create
the <tt>FunctionType</tt> that should be used for a given Prototype. Since all
function arguments in Kaleidoscope are of type double, the first line creates
a vector of "N" LLVM Double types. It then uses the <tt>FunctionType::get</tt>