fix build against LLVM trunk svn rev 273030

This commit is contained in:
Rainer Schuetze 2016-06-18 10:54:23 +02:00
parent 235f392ec8
commit f9995b1883
6 changed files with 28 additions and 0 deletions

View file

@ -579,7 +579,11 @@ void initializeArrayLiteral(IRState *p, ArrayLiteralExp *ale, LLValue *dstMem) {
auto gvar = new llvm::GlobalVariable(gIR->module, constarr->getType(),
true, LLGlobalValue::InternalLinkage,
constarr, ".arrayliteral");
#if LDC_LLVM_VER >= 309
gvar->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
#else
gvar->setUnnamedAddr(true);
#endif
DtoMemCpy(dstMem, gvar,
DtoConstSize_t(getTypeAllocSize(constarr->getType())));
}