<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Sorry I forgot to add code that I use
      to run code:<br>
      <pre style="margin: 0px; padding: 0px; border: 0px; font-size: 12px; font-family: Consolas, 'Liberation Mono', Courier, monospace; color: rgb(51, 51, 51); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 16px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><div class="line" id="LC33" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;"><span class="cm" style="margin: 0px; padding: 0px; border: 0px; color: rgb(153, 153, 136); font-style: italic;">/* Executes the AST by running the main function */</span></div><div class="line" id="LC34" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;"><span class="n" style="margin: 0px; padding: 0px; border: 0px;">GenericValue</span> <span class="n" style="margin: 0px; padding: 0px; border: 0px;">CodeGenContext</span><span class="o" style="margin: 0px
 ; paddi
ng: 0px; border: 0px; font-weight: bold;">::</span><span class="n" style="margin: 0px; padding: 0px; border: 0px;">runCode</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">()</span> <span class="p" style="margin: 0px; padding: 0px; border: 0px;">{</span></div><div class="line" id="LC35" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;">      <span class="n" style="margin: 0px; padding: 0px; border: 0px;">std</span><span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">::</span><span class="n" style="margin: 0px; padding: 0px; border: 0px;">cout</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;"><<</span> <span class="s" style="margin: 0px; padding: 0px; border: 0px; color: rgb(221, 17, 68);">"Running code...</span><span class="se" style="margin: 0px; padding: 0px; border: 0px; color: rgb(221, 17, 68);">\n</span><span class="s" style="margin: 0px; padding: 0px; border: 0px; colo
 r: rgb(2
21, 17, 68);">"</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">;</span></div><div class="line" id="LC36" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;">      <span class="n" style="margin: 0px; padding: 0px; border: 0px;">ExecutionEngine</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">*</span><span class="n" style="margin: 0px; padding: 0px; border: 0px;">ee</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">=</span> <span class="n" style="margin: 0px; padding: 0px; border: 0px;">EngineBuilder</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">(</span><span class="n" style="margin: 0px; padding: 0px; border: 0px;">module</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">).</span><span class="n" style="margin: 0px; padding: 0px; border: 0px;">create</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">();</span
 ></div><
div class="line" id="LC37" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;">       <span class="n" style="margin: 0px; padding: 0px; border: 0px;">vector</span><span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;"><</span><span class="n" style="margin: 0px; padding: 0px; border: 0px;">GenericValue</span><span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">></span> <span class="n" style="margin: 0px; padding: 0px; border: 0px;">noargs</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">;</span></div><div class="line" id="LC38" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;">     <span class="n" style="margin: 0px; padding: 0px; border: 0px;">GenericValue</span> <span class="n" style="margin: 0px; padding: 0px; border: 0px;">v</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">=</span> <span class="n" style="margin: 0px; padding: 0px; border: 
 0px;">ee
</span><span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">-></span><span class="n" style="margin: 0px; padding: 0px; border: 0px;">runFunction</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">(</span><span class="n" style="margin: 0px; padding: 0px; border: 0px;">mainFunction</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">,</span> <span class="n" style="margin: 0px; padding: 0px; border: 0px;">noargs</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">);</span></div><div class="line" id="LC39" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;">       <span class="n" style="margin: 0px; padding: 0px; border: 0px;">std</span><span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">::</span><span class="n" style="margin: 0px; padding: 0px; border: 0px;">cout</span> <span class="o" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;"><&lt
 ;</span>
 <span class="s" style="margin: 0px; padding: 0px; border: 0px; color: rgb(221, 17, 68);">"Code was run.</span><span class="se" style="margin: 0px; padding: 0px; border: 0px; color: rgb(221, 17, 68);">\n</span><span class="s" style="margin: 0px; padding: 0px; border: 0px; color: rgb(221, 17, 68);">"</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">;</span></div><div class="line" id="LC40" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;">  <span class="k" style="margin: 0px; padding: 0px; border: 0px; font-weight: bold;">return</span> <span class="n" style="margin: 0px; padding: 0px; border: 0px;">v</span><span class="p" style="margin: 0px; padding: 0px; border: 0px;">;</span></div><div class="line" id="LC41" style="margin: 0px; padding: 0px 0px 0px 10px; border: 0px;"><span class="p" style="margin: 0px; padding: 0px; border: 0px;">}</span></div></pre>
      <br>
      Il 08/01/2013 16:38, Manuele Conti ha scritto:<br>
    </div>
    <blockquote cite="mid:50EC3D65.7040003@sirius-es.it" type="cite">Hi
      Rick,
      <br>
      I had the same problem last week I understand that I didn't
      initialized target.
      <br>
      <br>
      Cheers,
      <br>
      Manuele
      <br>
      <br>
      Il 08/01/2013 16:08, Rick Mann ha scritto:
      <br>
      <blockquote type="cite">I wrote a little OS X app to assemble some
        LLVM (human-readable) code and run it. Unfortunately, my
        ExecutionEngine won't create. Just comes back NULL.
        <br>
        <br>
        This is the code that builds it:
        <br>
        <br>
            <a class="moz-txt-link-freetext" href="http://pastebin.com/8cexgPj7">http://pastebin.com/8cexgPj7</a>
        <br>
        <br>
        This is the code it seems to successfully assemble, but it can't
        build the ExecutionEngine. You can see I tried several different
        ways of building it.
        <br>
        <br>
            <a class="moz-txt-link-freetext" href="http://pastebin.com/tYq4kWX3">http://pastebin.com/tYq4kWX3</a>
        <br>
        <br>
        The module seems to get created properly (you can see the source
        and the result of mod->dump()).
        <br>
        <br>
        Is there a dylib that I need to include that has some init code
        that's otherwise not invoked? How can I tell why my
        ExecutionEngine didn't create? Is there an error code somewhere?
        <br>
        <br>
        I based my code off the HowTouseJIT.cpp example, llvm-as.cpp,
        and lli.cpp. I must've overlooked something, but I'm not sure
        what.
        <br>
        <br>
        <br>
        Any ideas? Thanks!
        <br>
        <br>
      </blockquote>
      <br>
      _______________________________________________
      <br>
      LLVM Developers mailing list
      <br>
      <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>
      <br>
      <a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
      <br>
      <br>
    </blockquote>
    <br>
  </body>
</html>