mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 08:30:47 +03:00
Merge branch 'master' into merge-2.067
This commit is contained in:
commit
ced658da92
7 changed files with 99 additions and 14 deletions
|
@ -389,7 +389,11 @@ LLConstant* DtoConstArrayInitializer(ArrayInitializer* arrinit)
|
|||
|
||||
LLConstant* idxs[2] = { DtoConstUint(0), DtoConstUint(0) };
|
||||
|
||||
#if LDC_LLVM_VER >= 307
|
||||
LLConstant* gep = llvm::ConstantExpr::getGetElementPtr(isaPointer(gvar)->getElementType(), gvar, idxs, true);
|
||||
#else
|
||||
LLConstant* gep = llvm::ConstantExpr::getGetElementPtr(gvar, idxs, true);
|
||||
#endif
|
||||
gep = llvm::ConstantExpr::getBitCast(gvar, getPtrToType(llelemty));
|
||||
|
||||
return DtoConstSlice(DtoConstSize_t(arrlen), gep, arrty);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue