Fix broken build with LLVM 3.0.

The method ConstantVector::getSplat() does not existin LLVM 3.0. Workarouund is to create a vector and use ConstantVector::get().
This commit is contained in:
kai 2012-09-09 20:36:48 +02:00
parent 4b0c4bf4ae
commit e78ff5a131

View file

@ -1481,7 +1481,12 @@ LLConstant* DtoConstExpInit(Loc loc, Type* type, Expression* exp)
{
LLConstant* val = exp->toConstElem(gIR);
TypeVector* tv = (TypeVector*)base;
#if LDC_LLVM_VER == 300
std::vector<LLConstant*> Elts(tv->size(loc), val);
return llvm::ConstantVector::get(Elts);
#else
return llvm::ConstantVector::getSplat(tv->size(loc), val);
#endif
}
#endif
else