[llvm] [Kaleidoscope] Fix ForExprAST::codegen (PR #88207)

Vlad Mishel via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 10 19:12:19 PDT 2024


================
@@ -447,8 +447,7 @@ from a starting value, while the condition ("i < n" in this case) is
 true, incrementing by an optional step value ("1.0" in this case). If
 the step value is omitted, it defaults to 1.0. While the loop is true,
 it executes its body expression. Because we don't have anything better
-to return, we'll just define the loop as always returning 0.0. In the
-future when we have mutable variables, it will get more useful.
----------------
vmishelcs wrote:

I removed the final sentence of this paragraph because I realized that the tutorial never actually does anything with the for-loop return value in future chapters.

https://github.com/llvm/llvm-project/pull/88207


More information about the llvm-commits mailing list