title: Retrieve generated LLVM from Numba
body: <p>After compiling a Python function with Numba such as:</p>
  
  <pre><code>from numba import jit
  
  @jit
  def sum(x, y):
      return x + y
  </code></pre>
  
  <p>how can I retrieve the generated LLVM code (as a string) of the compiled function?</p>
  
  <p>It looks as though this was available in a previous version of Numba via the lfunc property of the compiled function, but this isn't working.</p>
  
  <p>Similar functionality also appeared to exist in the form of <a href="http://numba.pydata.org/numba-doc/dev/annotate.html" rel="noreferrer">dumping the generated LLVM assembly</a> (during compilation). However, this doesn't seem to work anymore either - unless I'm doing something wrong. Having to run a terminal command would not be ideal anyway, as I would really like the code within Python, though I know I can do this with a subprocess.</p>
  
  <p>This is to attempt to create a portable version of the Python code at runtime which will be translate; I welcome any suggestions relating to this.</p>
  
  <p>Thanks</p>