[llvm-dev] Kaleidoscope code example error

Sudakshina Dutta via llvm-dev llvm-dev at lists.llvm.org
Fri Apr 2 05:45:03 PDT 2021


Dear all,

Good day to you. I was trying to subject some sample input code to
Kaleidoscope code (given in
https://llvm.org/docs/tutorial/MyFirstLanguageFrontend/index.html).
However, as I subject the following code segment (given in
https://llvm.org/docs/tutorial/MyFirstLanguageFrontend/LangImpl01.html) to
the kaleidoscope executable

# Compute the x'th fibonacci number.def fib(x)
  if x < 3 then
    1
  else
    fib(x-1)+fib(x-2)
# This expression will compute the 40th number.fib(40)

the following errors are shown.

ready> ready> Error: Unknown variable name
ready> Error: Unknown variable name
ready> Error: Unknown variable name
ready> Read top-level expression:
define double @__anon_expr() {
entry:
  ret double 1.000000e+00
}

ready> Error: Unknown variable name
ready> Error: Unknown function referenced
Error: Unknown function referenced
ready> ; ModuleID = 'my cool jit'
source_filename = "my cool jit"

Can somebody kindly help ?

Thanks a lot.

Sudakshina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210402/a8a1e392/attachment.html>


More information about the llvm-dev mailing list