I just updated my llvm sources (revision 164794.) and I see the error, "overriding non-deleted function" when building with gcc 4.7.0 and passing -std=c++11.
/usr2/sidneym/llvm/tools/install/bin/c++ -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -std=c++11 -fPIC -fvisibility-inlines-hidden -I/local/scratch/llvm-tmp/build/lib/VMCore -I/local/scratch/llvm-tmp/llvm/lib/VMCore -I/local/scratch/llvm-tmp/build/include -I/local/scratch/llvm-tmp/llvm/include -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fno-exceptions -o CMakeFiles/LLVMCore.dir/AsmWriter.cpp.o -c /local/scratch/llvm-tmp/llvm/lib/VMCore/AsmWriter.cpp
In file included from /local/scratch/llvm-tmp/llvm/lib/VMCore/AsmWriter.cpp:27:0:
/local/scratch/llvm-tmp/llvm/include/llvm/Operator.h:38:3: error: deleted function 'virtual llvm::Operator::~Operator()'
In file included from /local/scratch/llvm-tmp/llvm/include/llvm/Constant.h:17:0,
from /local/scratch/llvm-tmp/llvm/include/llvm/Constants.h:24,
from /local/scratch/llvm-tmp/llvm/lib/VMCore/AsmWriter.cpp:22:
/local/scratch/llvm-tmp/llvm/include/llvm/User.h:62:3: error: overriding non-deleted function 'virtual llvm::User::~User()'
make[2]: *** [lib/VMCore/CMakeFiles/LLVMCore.dir/AsmWriter.cpp.o] Error 1
make[2]: Leaving directory `/local/scratch/llvm-tmp/build'
make[1]: *** [lib/VMCore/CMakeFiles/LLVMCore.dir/all] Error 2
make[1]: Leaving directory `/local/scratch/llvm-tmp/build'
I've fixed this specific error in r164813. Please let me know if there
are more behind it.
I pulled this version, 164813 and the latest which is 164821 and I see essentially same error, the line number changed from 38 to 40.
The problem seems to stem from the addition of LLVM_DELETED_FUNCTION. I reverted back to a version that doesn't have this the build proceeds without issue.
While this probably isn't the correct fix, I removed all instances of LLVM_DELETED_FUNCTION from Operator.h and this allowed the build to complete. I don't know if it is the redundant use of delete or a problem with gcc-4.7.0
Here are the specifics from a build using the unmodified revision, r164813:
cd /local/scratch/llvm-tmp/build/lib/VMCore && /usr2/sidneym/llvm/tools/install/bin/c++ -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -std=c++11 -fPIC -fvisibility-inlines-hidden -I/local/scratch/llvm-tmp/build/lib/VMCore -I/local/scratch/llvm-tmp/llvm/lib/VMCore -I/local/scratch/llvm-tmp/build/include -I/local/scratch/llvm-tmp/llvm/include -Wall -W -Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long -fno-exceptions -o CMakeFiles/LLVMCore.dir/AsmWriter.cpp.o -c /local/scratch/llvm-tmp/llvm/lib/VMCore/AsmWriter.cpp
In file included from /local/scratch/llvm-tmp/llvm/lib/VMCore/AsmWriter.cpp:27:0:
/local/scratch/llvm-tmp/llvm/include/llvm/Operator.h:82:3: error: deleted function 'virtual llvm::OverflowingBinaryOperator::~OverflowingBinaryOperator()'
/local/scratch/llvm-tmp/llvm/include/llvm/Operator.h:40:3: error: overriding non-deleted function 'virtual llvm::Operator::~Operator()'
/local/scratch/llvm-tmp/llvm/include/llvm/Operator.h:136:3: error: deleted function 'virtual llvm::PossiblyExactOperator::~PossiblyExactOperator()'
/local/scratch/llvm-tmp/llvm/include/llvm/Operator.h:40:3: error: overriding non-deleted function 'virtual llvm::Operator::~Operator()'
/local/scratch/llvm-tmp/llvm/include/llvm/Operator.h:173:3: error: deleted function 'virtual llvm::FPMathOperator::~FPMathOperator()'
/local/scratch/llvm-tmp/llvm/include/llvm/Operator.h:40:3: error: overriding non-deleted function 'virtual llvm::Operator::~Operator()'
/local/scratch/llvm-tmp/llvm/include/llvm/Operator.h: In instantiation of 'class llvm::ConcreteOperator<llvm::Operator, 29u>':
/local/scratch/llvm-tmp/llvm/include/llvm/Operator.h:251:67: required from here
/local/scratch/llvm-tmp/llvm/include/llvm/Operator.h:196:3: error: deleted function 'llvm::ConcreteOperator<SuperClass,
sidneym@sidneym-ubuntu:..llvm-tmp/build> gcc --version
gcc (GCC) 4.7.0
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.