Hi everyone. I am using LLVM 2.4 release to practise the tutorial at Kaleidoscope Chapter 4.<br>I built the LLVM library, and created my own project, and then paste the code from the tutorial into my own project. Then after compiled and built it, I passed the built stage. (I am using visual studio 2005 )<br>
<br>However, when I tried to input some code in the command line window, the sample program crashed. And the Visual Studio 2005 debugger told me that "Access violation reading location 0x00000008."<br>And then it jumped to the code:<br>
"  const TargetData *getTargetData() const { return TD; }"<br>Actually, these codes are suspicous:<br><br>TheExecutionEngine = ExecutionEngine::create(TheModule);<br>  // Set up the optimizer pipeline.  Start with registering info about how the<br>
  // target lays out data structures.<br>  OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData()));<br><br>There is nothing to initialize the TD variable, so the exception is quite understandable. But how to eliminate this problem? Can anyone give me a help?<br>
<br>Thank you very much for any guidance.<br><br>-- <br>Best regards.