[LLVMdev] include's are not being located

Jonathan Roelofs jonathan at codesourcery.com
Thu Jun 12 14:37:29 PDT 2014



On 6/12/14, 3:07 PM, Joseph wrote:
> Hi Dan,
>
>
> So now that the includes are being found building the tutorial results in 74 warnings and 20 errors. Heres a couple examples:
>
> In file included from /usr/local/include/llvm/IR/DerivedTypes.h:21:
> In file included from /usr/local/include/llvm/IR/Type.h:19:
> In file included from /usr/local/include/llvm/ADT/APFloat.h:20:
> In file included from /usr/local/include/llvm/ADT/APInt.h:19:
> In file included from /usr/local/include/llvm/ADT/ArrayRef.h:14:
> /usr/local/include/llvm/ADT/SmallVector.h:232:20: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
>    void push_back(T &&Elt) {
>                     ^
> /usr/local/include/llvm/ADT/SmallVector.h:476:33: warning: rvalue references are a C++11 extension [-Wc++11-extensions]
>    iterator insert(iterator I, T &&Elt) {
>
You need to build Clang/LLVM with a {CXX, CXXFLAGS} pair (read: a c++ compiler 
for your host) that supports C++11. That can either be one whose default is 
c++11, or one that doesn't but lets you put '--std=c++11' in the CXXFLAGS.

http://llvm.org/docs/GettingStarted.html suggests GCC >= 4.7.0 for this.
>
>
> Thank you!
> Joseph
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>

-- 
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded



More information about the llvm-dev mailing list