llvm build errors

Hi Everyone

I notice llvm has stopped building with g++ in the last 24 hours.

I build with g++ from here:
http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.0/threads-win32/seh/

The error messages are below. Hope this is useful to someone, assuming the breakage is not intentional.

lib/Linker/CMakeFiles/LLVMLinker.dir/LinkModules.cpp.obj
FAILED: \mingw\bin\x86_64-w64-mingw32-c++.exe -DGTEST_HAS_RTTI=0 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STD
C_LIMIT_MACROS -std=c++1y -pipe -march=corei7 -O3 -Wall -Wpedantic -Wno-deprecated -D_FORTIFY_SOURCE=2 -Wall -W -Wno-unuse
d-parameter -Wwrite-strings -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wnon-virtua
l-dtor -Wno-comment -std=gnu++11 -O2 -DNDEBUG -Ilib/Linker -Ic:/llvm/lib/Linker -Iinclude -Ic:/llvm/include -fno-excep
tions -fno-rtti -MMD -MT lib/Linker/CMakeFiles/LLVMLinker.dir/LinkModules.cpp.obj -MF lib/Linker/CMakeFiles/LLVMLinker.dir
/LinkModules.cpp.obj.d -o lib/Linker/CMakeFiles/LLVMLinker.dir/LinkModules.cpp.obj -c c:/llvm/lib/Linker/LinkModules.cpp
In file included from c:/llvm/include/llvm/Transforms/Utils/Cloning.h:24:0,
from c:/llvm/lib/Linker/LinkModules.cpp:25:
c:/llvm/include/llvm/IR/ValueMap.h:48:48: error: ‘recursive_mutex’ in namespace ‘std’ does not name a type
template<typename KeyT, typename MutexT = std::recursive_mutex>
^
c:/llvm/include/llvm/IR/ValueMap.h:76:78: error: template argument 2 is invalid
template<typename KeyT, typename ValueT, typename Config =ValueMapConfig >
^
In file included from c:/llvm/include/llvm/Transforms/Utils/Cloning.h:25:0,
from c:/llvm/lib/Linker/LinkModules.cpp:25:
c:/llvm/include/llvm/Transforms/Utils/ValueMapper.h:23:41: error: template argument 3 is invalid
typedef ValueMap<const Value , WeakVH> ValueToValueMapTy;
^
c:/llvm/include/llvm/Transforms/Utils/ValueMapper.h:23:60: error: invalid type in declaration before ‘;’ token
typedef ValueMap<const Value , WeakVH> ValueToValueMapTy;
^
c:/llvm/lib/Linker/LinkModules.cpp: In member function 'bool {anonymous}::ModuleLinker::linkAppendingVarProto(llvm::Global
Variable
, llvm::GlobalVariable
)‘:
c:/llvm/lib/Linker/LinkModules.cpp:749:19: error: no match for ‘operator=’ (operand types are ‘llvm::GlobalVariable’ and ’
llvm::Constant*’)
ValueMap[SrcGV] = ConstantExpr::getBitCast(NG, TypeMap.get(SrcGV->getType()));
^
c:/llvm/lib/Linker/LinkModules.cpp:749:19: note: candidate is:
In file included from c:/llvm/include/llvm/IR/Module.h:22:0,
from c:/llvm/lib/Linker/LinkModules.cpp:20:
c:/llvm/include/llvm/IR/GlobalVariable.h:38:8: note: void llvm::GlobalVariable::operator=(const llvm::GlobalVariable&) <de

void operator=(const GlobalVariable &) LLVM_DELETED_FUNCTION;
^
c:/llvm/include/llvm/IR/GlobalVariable.h:38:8: note: no known conversion for argument 1 from ‘llvm::Constant*’ to ‘const
llvm::GlobalVariable&’
c:/llvm/lib/Linker/LinkModules.cpp: In member function ‘bool {anonymous}::ModuleLinker::linkGlobalProto(llvm::GlobalVariab
le*)’:
c:/llvm/lib/Linker/LinkModules.cpp:796:21: error: no match for ‘operator=’ (operand types are ‘llvm::GlobalVariable’ and ’
llvm::Constant*')
ValueMap[SGV] = ConstantExpr::getBitCast(DGV,TypeMap.get(SGV->getType()));
^
c:/llvm/lib/Linker/LinkModules.cpp:796:21: note: candidate is:
In file included from c:/llvm/include/llvm/IR/Module.h:22:0,
from c:/llvm/lib/Linker/LinkModules.cpp:20:
c:/llvm/include/llvm/IR/GlobalVariable.h:38:8: note: void llvm::GlobalVariable::operator=(const llvm::GlobalVariable&) <de

void operator=(const GlobalVariable &) LLVM_DELETED_FUNCTION;
^
c:/llvm/include/llvm/IR/GlobalVariable.h:38:8: note: no known conversion for argument 1 from ‘llvm::Constant*’ to ‘const
llvm::GlobalVariable&’
c:/llvm/lib/Linker/LinkModules.cpp:827:17: error: no match for ‘operator=’ (operand types are ‘llvm::GlobalVariable’ and ’
llvm::GlobalVariable*')
ValueMap[SGV] = NewDGV;
^
c:/llvm/lib/Linker/LinkModules.cpp:827:17: note: candidate is:
In file included from c:/llvm/include/llvm/IR/Module.h:22:0,
from c:/llvm/lib/Linker/LinkModules.cpp:20:
c:/llvm/include/llvm/IR/GlobalVariable.h:38:8: note: void llvm::GlobalVariable::operator=(const llvm::GlobalVariable&) <de

void operator=(const GlobalVariable &) LLVM_DELETED_FUNCTION;
^
c:/llvm/include/llvm/IR/GlobalVariable.h:38:8: note: no known conversion for argument 1 from ‘llvm::GlobalVariable*’ to
‘const llvm::GlobalVariable&’
c:/llvm/lib/Linker/LinkModules.cpp: In member function 'bool {anonymous}::ModuleLinker::linkFunctionProto(llvm::Function*)
‘:
c:/llvm/lib/Linker/LinkModules.cpp:854:20: error: no match for ‘operator=’ (operand types are ‘llvm::Function’ and ‘llvm::
Constant*’)
ValueMap[SF] = ConstantExpr::getBitCast(DGV, TypeMap.get(SF->getType()));
^
c:/llvm/lib/Linker/LinkModules.cpp:854:20: note: candidate is:
In file included from c:/llvm/include/llvm/IR/Module.h:20:0,
from c:/llvm/lib/Linker/LinkModules.cpp:20:
c:/llvm/include/llvm/IR/Function.h:114:8: note: void llvm::Function::operator=(const llvm::Function&)
void operator=(const Function&) LLVM_DELETED_FUNCTION;
^
c:/llvm/include/llvm/IR/Function.h:114:8: note: no known conversion for argument 1 from ‘llvm::Constant*’ to ‘const llvm
::Function&’
c:/llvm/lib/Linker/LinkModules.cpp:887:16: error: no match for ‘operator=’ (operand types are ‘llvm::Function’ and ‘llvm::
Function*’)
ValueMap[SF] = NewDF;
^
c:/llvm/lib/Linker/LinkModules.cpp:887:16: note: candidate is:
In file included from c:/llvm/include/llvm/IR/Module.h:20:0,
from c:/llvm/lib/Linker/LinkModules.cpp:20:
c:/llvm/include/llvm/IR/Function.h:114:8: note: void llvm::Function::operator=(const llvm::Function&)
void operator=(const Function&) LLVM_DELETED_FUNCTION;
^
c:/llvm/include/llvm/IR/Function.h:114:8: note: no known conversion for argument 1 from ‘llvm::Function*’ to ‘const llvm
::Function&’
c:/llvm/lib/Linker/LinkModules.cpp: In member function ‘bool {anonymous}::ModuleLinker::linkAliasProto(llvm::GlobalAlias*)
‘:
c:/llvm/lib/Linker/LinkModules.cpp:914:21: error: no match for ‘operator=’ (operand types are ‘llvm::GlobalAlias’ and ‘llv
m::Constant*’)
ValueMap[SGA] = ConstantExpr::getBitCast(DGV,TypeMap.get(SGA->getType()));
^
c:/llvm/lib/Linker/LinkModules.cpp:914:21: note: candidate is:
In file included from c:/llvm/include/llvm/IR/Module.h:21:0,
from c:/llvm/lib/Linker/LinkModules.cpp:20:
c:/llvm/include/llvm/IR/GlobalAlias.h:31:8: note: void llvm::GlobalAlias::operator=(const llvm::GlobalAlias&)
void operator=(const GlobalAlias &) LLVM_DELETED_FUNCTION;
^
c:/llvm/include/llvm/IR/GlobalAlias.h:31:8: note: no known conversion for argument 1 from ‘llvm::Constant*’ to ‘const ll
vm::GlobalAlias&’
c:/llvm/lib/Linker/LinkModules.cpp:940:17: error: no match for ‘operator=’ (operand types are ‘llvm::GlobalAlias’ and ‘llv
m::GlobalAlias*’)
ValueMap[SGA] = NewDA;
^
c:/llvm/lib/Linker/LinkModules.cpp:940:17: note: candidate is:
In file included from c:/llvm/include/llvm/IR/Module.h:21:0,
from c:/llvm/lib/Linker/LinkModules.cpp:20:
c:/llvm/include/llvm/IR/GlobalAlias.h:31:8: note: void llvm::GlobalAlias::operator=(const llvm::GlobalAlias&)
void operator=(const GlobalAlias &) LLVM_DELETED_FUNCTION;
^
c:/llvm/include/llvm/IR/GlobalAlias.h:31:8: note: no known conversion for argument 1 from ‘llvm::GlobalAlias*’ to ‘const
llvm::GlobalAlias&’
c:/llvm/lib/Linker/LinkModules.cpp: In member function ‘void {anonymous}::ModuleLinker::linkGlobalInits()’:
c:/llvm/lib/Linker/LinkModules.cpp:974:59: error: cannot convert ‘const llvm::GlobalVariable’ to ‘llvm::GlobalVariable*’ i
n initialization
GlobalVariable DGV = cast(ValueMap[I]);
^
c:/llvm/lib/Linker/LinkModules.cpp: In member function 'void {anonymous}::ModuleLinker::linkFunctionBody(llvm::Function
,
llvm::Function*)’:
c:/llvm/lib/Linker/LinkModules.cpp:994:17: error: no match for ‘operator=’ (operand types are ‘llvm::Argument’ and ‘llvm::
Function::arg_iterator {aka llvm::ilist_iteratorllvm::Argument}’)
ValueMap[I] = DI;
^
c:/llvm/lib/Linker/LinkModules.cpp:994:17: note: candidates are:
In file included from c:/llvm/include/llvm/IR/Function.h:22:0,
from c:/llvm/include/llvm/IR/Module.h:20,
from c:/llvm/lib/Linker/LinkModules.cpp:20:
c:/llvm/include/llvm/IR/Argument.h:35:7: note: llvm::Argument& llvm::Argument::operator=(const llvm::Argument&)
class Argument : public Value, public ilist_node {
^
c:/llvm/include/llvm/IR/Argument.h:35:7: note: no known conversion for argument 1 from ‘llvm::Function::arg_iterator {ak
a llvm::ilist_iteratorllvm::Argument}’ to ‘const llvm::Argument&’
c:/llvm/include/llvm/IR/Argument.h:35:7: note: llvm::Argument& llvm::Argument::operator=(llvm::Argument&&)
c:/llvm/include/llvm/IR/Argument.h:35:7: note: no known conversion for argument 1 from ‘llvm::Function::arg_iterator {ak
a llvm::ilist_iteratorllvm::Argument}’ to ‘llvm::Argument&&’
c:/llvm/lib/Linker/LinkModules.cpp:1020:14: error: request for member ‘erase’ in ‘(({anonymous}::ModuleLinker*)this)->{ano
nymous}::ModuleLinker::ValueMap’, which is of non-class type ‘llvm::ValueToValueMapTy {aka int}’
ValueMap.erase(I);
^
c:/llvm/lib/Linker/LinkModules.cpp: In member function ‘void {anonymous}::ModuleLinker::linkAliasBodies()’:
c:/llvm/lib/Linker/LinkModules.cpp:1031:54: error: cannot convert ‘llvm::GlobalAlias’ to ‘llvm::GlobalAlias*’ in initializ
ation
GlobalAlias DA = cast(ValueMap[I]);
^
c:/llvm/lib/Linker/LinkModules.cpp: In member function ‘bool {anonymous}::ModuleLinker::run()’:
c:/llvm/lib/Linker/LinkModules.cpp:1288:47: error: cannot convert ‘llvm::Function’ to 'llvm::Function
’ in initialization
Function DF = cast(ValueMap[SF]);
^
c:/llvm/lib/Linker/LinkModules.cpp:1334:49: error: cannot convert ‘llvm::Function’ to 'llvm::Function
’ in initialization
Function *DF = cast(ValueMap[SF]);
^
[12/1498] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTOModule.cpp.obj

This is due to a patch I submitted yesterday. There’s actually another thread about it that i just CC’ed to this mailing list called “Replace Execution Engine’s mutex with std::recursive_mutex”. It’s best to centralize all the discussion into a single thread. I’m not sure which thread is more appropriate, but since I already wrote an explanation on that thread, I’ll just choose that one as the point of discussion. So please respond on the other thread if you have additional comments.