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

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 10 10:11:14 PDT 2024


================
@@ -637,75 +639,113 @@ expression for the loop value:
         return nullptr;
 
 With this out of the way, the next step is to set up the LLVM basic
-block for the start of the loop body. In the case above, the whole loop
-body is one block, but remember that the body code itself could consist
+blocks that make up the for-loop statement. In the case above, the whole
+loop body is one block, but remember that the body code itself could consist
 of multiple blocks (e.g. if it contains an if/then/else or a for/in
 expression).
 
 .. code-block:: c++
 
-      // Make the new basic block for the loop header, inserting after current
-      // block.
+      // Make new basic blocks for loop condition, loop body and end-loop code.
----------------
Logikable wrote:

Add Oxford comma.

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


More information about the llvm-commits mailing list