<div dir="ltr">Thank you. I understood the mistake.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Apr 3, 2021 at 1:39 AM David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Perhaps you're trying to run that fib example in noe of the early<br>
chapters (like chapter 1) - it's only going to work once you're a few<br>
chapters in - I think at least around chapter 5, which provides<br>
control flow ('if'/'else').<br>
<br>
On Fri, Apr 2, 2021 at 5:45 AM Sudakshina Dutta via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Dear all,<br>
><br>
> Good day to you. I was trying to subject some sample input code to Kaleidoscope code (given in <a href="https://llvm.org/docs/tutorial/MyFirstLanguageFrontend/index.html" rel="noreferrer" target="_blank">https://llvm.org/docs/tutorial/MyFirstLanguageFrontend/index.html</a>). However, as I subject the following code segment (given in <a href="https://llvm.org/docs/tutorial/MyFirstLanguageFrontend/LangImpl01.html" rel="noreferrer" target="_blank">https://llvm.org/docs/tutorial/MyFirstLanguageFrontend/LangImpl01.html</a>) to the kaleidoscope executable<br>
><br>
> # Compute the x'th fibonacci number.<br>
> def fib(x)<br>
> if x < 3 then<br>
> 1<br>
> else<br>
> fib(x-1)+fib(x-2)<br>
><br>
> # This expression will compute the 40th number.<br>
> fib(40)<br>
><br>
> the following errors are shown.<br>
><br>
> ready> ready> Error: Unknown variable name<br>
> ready> Error: Unknown variable name<br>
> ready> Error: Unknown variable name<br>
> ready> Read top-level expression:<br>
> define double @__anon_expr() {<br>
> entry:<br>
> ret double 1.000000e+00<br>
> }<br>
><br>
> ready> Error: Unknown variable name<br>
> ready> Error: Unknown function referenced<br>
> Error: Unknown function referenced<br>
> ready> ; ModuleID = 'my cool jit'<br>
> source_filename = "my cool jit"<br>
><br>
> Can somebody kindly help ?<br>
><br>
> Thanks a lot.<br>
><br>
> Sudakshina<br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>