https://bugs.llvm.org/show_bug.cgi?id=35705

            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: [email protected]
          Reporter: [email protected]
                CC: [email protected]

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, "",
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
https://llvm.org/docs/tutorial/

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to