<div dir="ltr"><div>Dear all,</div><div><br></div><div>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">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">https://llvm.org/docs/tutorial/MyFirstLanguageFrontend/LangImpl01.html</a>) to the kaleidoscope executable</div><div><pre><span class="gmail-c1"># Compute the x'th fibonacci number.</span>
<span class="gmail-k">def</span> <span class="gmail-nf">fib</span><span class="gmail-p">(</span><span class="gmail-n">x</span><span class="gmail-p">)</span>
<span class="gmail-k">if</span> <span class="gmail-n">x</span> <span class="gmail-o"><</span> <span class="gmail-mi">3</span> <span class="gmail-n">then</span>
<span class="gmail-mi">1</span>
<span class="gmail-k">else</span>
<span class="gmail-n">fib</span><span class="gmail-p">(</span><span class="gmail-n">x</span><span class="gmail-o">-</span><span class="gmail-mi">1</span><span class="gmail-p">)</span><span class="gmail-o">+</span><span class="gmail-n">fib</span><span class="gmail-p">(</span><span class="gmail-n">x</span><span class="gmail-o">-</span><span class="gmail-mi">2</span><span class="gmail-p">)</span>
<span class="gmail-c1"># This expression will compute the 40th number.</span>
<span class="gmail-n">fib</span><span class="gmail-p">(</span><span class="gmail-mi">40</span><span class="gmail-p">)</span>
<br></pre><pre><font size="2"><font face="arial,sans-serif">the following errors are shown.<br><br><span style="font-family:monospace">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"</span><br><br></font></font></pre><pre><font size="2"><font face="arial,sans-serif">Can somebody kindly help ? <br><br></font></font></pre><pre><font size="2"><font face="arial,sans-serif">Thanks a lot.<br></font></font></pre><pre><font size="2"><font face="arial,sans-serif">Sudakshina<br></font></font></pre></div></div>