<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
The tutorial is not always up-to-date when a new release arrives.<br>
<br>
I had similar problems (not exactly the same cases) when learning
through the tutorials using LLVM-2.3.<br>
<br>
My best suggestion is to read through part of the source code and
figure out why it is behaving strangely.<br>
And, use Linux (gcc) rather than Windows (visual studio) compilers for
the learning purpose.<br>
<br>
In the end, I think the tutorials are still pretty good, though some
minus updates are always needed.<br>
<br>
Chuck<br>
<br>
Alex.Wang wrote:
<blockquote
 cite="mid:e6bba8fe0812020747r40cba26amc5a3925c7496407d@mail.gmail.com"
 type="cite">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.
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a class="moz-txt-link-freetext" href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
  </pre>
</blockquote>
<br>
</body>
</html>