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.
> > Error: Unknown variable name
> Error: Unknown variable name
> Error: Unknown variable name
> Read top-level expression:
define double @__anon_expr() {
entry:
ret double 1.000000e+00
}
> Error: Unknown variable name
> Error: Unknown function referenced
Error: Unknown function referenced
> ; ModuleID = 'my cool jit'
source_filename = "my cool jit"
Can somebody kindly help ?
Thanks a lot.
Sudakshina