I also have come across this problem, it seems that simply removing the related code of `DataLayout ` would be fine, although I do not whether it could lead some other problems.<div><div><br></div><div>Hongxu Chen<br><br><div class="gmail_quote">
On Wed, Oct 17, 2012 at 11:53 PM, Jun Koi [via LLVM] <span dir="ltr"><<a href="/user/SendEmail.jtp?type=node&node=50014&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span> wrote:<br><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


        hi,
<br><br>with LLVM 3.1, i am trying to compile toy.cpp from
<br><a href="http://llvm.org/docs/tutorial/LangImpl7.html#code" rel="nofollow" link="external" target="_blank">http://llvm.org/docs/tutorial/LangImpl7.html#code</a>.
<br><br>i got the following error:
<br><br>$ clang++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit
<br>native` -O3 -o toy
<br>toy.cpp:4:10: fatal error: 'llvm/IRBuilder.h' file not found
<br>#include "llvm/IRBuilder.h"
<br><br><br>i fixed this by modifying the broken line to:
<br><br>#include "llvm/Support/IRBuilder.h"
<br><br><br>then i compiled again, but got another error:
<br><br>$ clang++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit
<br>native` -O3 -o toy
<br>toy.cpp:1115:18: error: unknown type name 'DataLayout'
<br>  OurFPM.add(new DataLayout(*TheExecutionEngine->getDataLayout()));
<br><br><br>this is due to the removal of DataLayout structure from 3.1.
<br>how can i fix this bug?
<br><br>thanks,
<br>Jun
<br>_______________________________________________
<br>LLVM Developers mailing list
<br><a href="http://user/SendEmail.jtp?type=node&node=50012&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>         <a href="http://llvm.cs.uiuc.edu" rel="nofollow" link="external" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" rel="nofollow" link="external" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>

        
        
        
        <br>
        <br>
        <hr noshade size="1" color="#cccccc">
        <div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://llvm.1065342.n5.nabble.com/a-bug-in-Kaleidoscope-code-tp50012.html" target="_blank" rel="nofollow" link="external">http://llvm.1065342.n5.nabble.com/a-bug-in-Kaleidoscope-code-tp50012.html</a>
        </div>
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                To start a new topic under LLVM - Dev, email <a href="/user/SendEmail.jtp?type=node&node=50014&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a> <br>
                To unsubscribe from LLVM, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>

                <a href="http://llvm.1065342.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_blank" link="external">NAML</a>
        </div></blockquote></div><br>
</div></div>


        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://llvm.1065342.n5.nabble.com/a-bug-in-Kaleidoscope-code-tp50012p50014.html">Re: a bug in Kaleidoscope code</a><br/>
Sent from the <a href="http://llvm.1065342.n5.nabble.com/LLVM-Dev-f3.html">LLVM - Dev mailing list archive</a> at Nabble.com.<br/>