[llvm-bugs] [Bug 35705] New: Kaleidoscope Source Chapter 8 Does not Compile

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Dec 20 05:40:56 PST 2017


            Bug ID: 35705
           Summary: Kaleidoscope Source Chapter 8 Does not Compile
           Product: Documentation
           Version: 5.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: General docs
          Assignee: unassignedbugs at nondot.org
          Reporter: myk321 at gmail.com
                CC: llvm-bugs at lists.llvm.org

The tutorial available here: https://llvm.org/docs/tutorial/LangImpl08.html

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: https://reviews.llvm.org/D27762

KSDbgInfo.TheCU = DBuilder->createCompileUnit(dwarf::DW_LANG_C,
                                 "fib.ks", ".", "Kaleidoscope Compiler", 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

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171220/36120667/attachment.html>

More information about the llvm-bugs mailing list