diff --git a/gen/llvmhelpers.cpp b/gen/llvmhelpers.cpp index 50c47c07..e53038c9 100644 --- a/gen/llvmhelpers.cpp +++ b/gen/llvmhelpers.cpp @@ -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 Elts(tv->size(loc), val); + return llvm::ConstantVector::get(Elts); +#else return llvm::ConstantVector::getSplat(tv->size(loc), val); +#endif } #endif else