[LLVMdev] a bug in Kaleidoscope code
Sean Silva
silvas at purdue.edu
Wed Oct 17 09:28:32 PDT 2012
If you are using LLVM 3.1, you will want to use the docs from LLVM
3.1. The docs at llvm.org/docs/ are generated from the bleeding-edge
SVN revision. There is actually a warning about this at the top of
llvm.org/docs which points to the place to get the docs for older
versions, although I don't blame you for missing it.
-- Sean Silva
On Wed, Oct 17, 2012 at 11:49 AM, Jun Koi <junkoi2004 at gmail.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
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list