<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Kaleidoscope Source Chapter 8 Does not Compile"
   href="https://bugs.llvm.org/show_bug.cgi?id=35705">35705</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Kaleidoscope Source Chapter 8 Does not Compile
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Documentation
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>5.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>General docs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>myk321@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The tutorial available here: <a href="https://llvm.org/docs/tutorial/LangImpl08.html">https://llvm.org/docs/tutorial/LangImpl08.html</a>

Provides source code for the Kaleidoscope compiler, that does not compile, due
to the following two cases, where it appears that the provided source is out of
date compared to the llvm API.

Case 1:
-------
toy.cpp:1440:25: error: cannot initialize a parameter of type 'llvm::DIFile *'
      with an lvalue of type 'const char [7]'
      dwarf::DW_LANG_C, "fib.ks", ".", "Kaleidoscope Compiler", 0, "", 0);

Due to: <a href="https://reviews.llvm.org/D27762">https://reviews.llvm.org/D27762</a>

KSDbgInfo.TheCU = DBuilder->createCompileUnit(dwarf::DW_LANG_C,
                                 "fib.ks", ".", "Kaleidoscope Compiler", 0, "",
0);

Possibly this should be:
KSDbgInfo.TheCU = DBuilder->createCompileUnit(dwarf::DW_LANG_C,
                                 DBuilder->createFile("fib.ks", "."),
"Kaleidoscope Compiler", 0, "", 0);


Case 2:
--------
toy.cpp:826:55: error: too many arguments to function call, expected 3, have 4
  DblTy = DBuilder->createBasicType("double", 64, 64, dwarf::DW_ATE_float);

Possibly this should be:
        DblTy = DBuilder->createBasicType("double", 64, dwarf::DW_ATE_float);

Request that the source code in the documentation be updated.  Note that
similiar source code appears on multiple pages under
<a href="https://llvm.org/docs/tutorial/">https://llvm.org/docs/tutorial/</a></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>