[PATCH] D142323: [Kaleidoscope] Update code snippets in text to match full code listings

Shivam Gupta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 29 11:25:53 PST 2023


xgupta added subscribers: kazu, xgupta.
xgupta added reviewers: kazu, aaron.ballman.
xgupta accepted this revision.
xgupta added a comment.
This revision is now accepted and ready to land.

Thank you for the patch!

I went through all the changes, they look good to me.



================
Comment at: llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl04.rst:300
 
+    static ExitOnError ExitOnErr;
+    ...
----------------
we may remove this line.


================
Comment at: llvm/docs/tutorial/MyFirstLanguageFrontend/LangImpl07.rst:583
+        // Note: If LLVM is built without RTTI (the default), a static_cast
+        //       must be used here.
         VariableExprAST *LHSE = dynamic_cast<VariableExprAST*>(LHS.get());
----------------
Not sure about this, why not use static_cast then by default? @kazu might better review this.


================
Comment at: llvm/examples/Kaleidoscope/Chapter9/toy.cpp:803
     // Make an anonymous proto.
-    auto Proto = std::make_unique<PrototypeAST>(FnLoc, "__anon_expr",
+    auto Proto = std::make_unique<PrototypeAST>(FnLoc, "main",
                                                  std::vector<std::string>());
----------------
  // Make an anonymous proto.
This comment is better suited for  __anon_expr. we should keep it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142323/new/

https://reviews.llvm.org/D142323



More information about the llvm-commits mailing list