title: LLVM IR main function returning void
body: <p>I'm testing a main function that simply returns void and am get core dump errors (signal 65 or 73) when running the bitcode with <code>lli</code>:</p>
  
  <pre><code>define void @main() {
  entry:
    ret void
  }
  </code></pre>
  
  <p>Is it a limitation of <code>lli</code> or just plain illegal in LLVM?</p>
  
  <p>I'm well aware that in C++ the declaration of a main function with a return type of void is incorrect. In fact I've tried this with Clang (it's just a warning to do so) and get almost the same code (not exactly the same because of the <code>#0</code> attributes, but close enough that I believe the differences are not causing this problem):</p>
  
  <pre><code>; Function Attrs: nounwind
  define void @main() #0 {
  entry:
    ret void
  }
  </code></pre>