mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-30 23:20:40 +03: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:
parent
4b0c4bf4ae
commit
e78ff5a131
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue