[LLVMdev] 'Implementing a language with LLVM' tutorial

Ryan Brown ribrdb at google.com
Mon Nov 5 12:45:30 PST 2007


Very nice.  Here's a couple comments on the first 6 chapters:
http://llvm.org/docs/tutorial/LangImpl1.html
"We handle comments by skipping to the end of the line and then
returning the next comment."

Shouldn't this say "returning the next comment"?

http://llvm.org/docs/tutorial/LangImpl2.html
I was a bit confused at first because the AST node classes are called
ASTs. Instead of saying "ExprAST node" all the time, who not just call
the class ExprNode or ExprAstNode?

http://llvm.org/docs/tutorial/LangImpl3.html
  case '<':
    L = Builder.CreateFCmpULT(L, R, "multmp");
Should this be something like "cmptmp"?

Also, you mention zero-argument functions, but it doesn't look like
you can parse function calls with zero arguments.


http://llvm.org/docs/tutorial/LangImpl5.html
At this point, you are probably starting to think "on no!
Should be "Oh no"

There's no link to the next chapter at the end of this chapter.

On 11/5/07, Chris Lattner <sabre at nondot.org> wrote:
> On Mon, 5 Nov 2007, Aaron Gray wrote:
> >> Anyone have thoughts or feedback? :)
> >
> > Nice job. The only bit that is not immediately clear is the 'Proto'
> > variable, but is clear when looking through the code at the end of the page.
>
> Where in the tutorial?  What would you suggest that I say?
>
> > Could do with a link to the LLVMBuilder class reference material.
>
> I added a link to the doxygen info, thanks!
>
> -Chris
>
> --
> http://nondot.org/sabre/
> http://llvm.org/
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>


-- 
Ryan Brown
Gws UI Team



More information about the llvm-dev mailing list