[LLVMdev] a bug in Kaleidoscope code

Hongxu Chen leftcopy.chx at gmail.com
Wed Oct 17 09:05:59 PDT 2012


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.

Hongxu Chen

On Wed, Oct 17, 2012 at 11:53 PM, Jun Koi [via LLVM] <
ml-node+s1065342n50012h63 at n5.nabble.com> wrote:

> hi,
>
> with LLVM 3.1, i am trying to compile toy.cpp from
> http://llvm.org/docs/tutorial/LangImpl7.html#code.
>
> i got the following error:
>
> $ clang++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit
> native` -O3 -o toy
> toy.cpp:4:10: fatal error: 'llvm/IRBuilder.h' file not found
> #include "llvm/IRBuilder.h"
>
>
> i fixed this by modifying the broken line to:
>
> #include "llvm/Support/IRBuilder.h"
>
>
> then i compiled again, but got another error:
>
> $ clang++ -g toy.cpp `llvm-config --cppflags --ldflags --libs core jit
> native` -O3 -o toy
> toy.cpp:1115:18: error: unknown type name 'DataLayout'
>   OurFPM.add(new DataLayout(*TheExecutionEngine->getDataLayout()));
>
>
> this is due to the removal of DataLayout structure from 3.1.
> how can i fix this bug?
>
> thanks,
> Jun
> _______________________________________________
> LLVM Developers mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=50012&i=0>
>   http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
> http://llvm.1065342.n5.nabble.com/a-bug-in-Kaleidoscope-code-tp50012.html
>  To start a new topic under LLVM - Dev, email
> ml-node+s1065342n3h84 at n5.nabble.com
> To unsubscribe from LLVM, click here<http://llvm.1065342.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2&code=bGVmdGNvcHkuY2h4QGdtYWlsLmNvbXwyfC0xMjc2Njc5OTI2>
> .
> NAML<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>
>




--
View this message in context: http://llvm.1065342.n5.nabble.com/a-bug-in-Kaleidoscope-code-tp50012p50014.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121017/8dc71807/attachment.html>


More information about the llvm-dev mailing list