mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user