mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 09:00:33 +03:00
Merge branch 'master' into merge-2.075
Conflicts: runtime/druntime
This commit is contained in:
commit
d7f68dbeb3
28 changed files with 489 additions and 261 deletions
|
@ -384,12 +384,19 @@ static void DtoCreateNestedContextType(FuncDeclaration *fd) {
|
|||
irLocal.nestedDepth = depth;
|
||||
|
||||
LLType *t = nullptr;
|
||||
if (vd->isRef() || vd->isOut())
|
||||
if (vd->isRef() || vd->isOut()) {
|
||||
t = DtoType(vd->type->pointerTo());
|
||||
else if (vd->isParameter() && (vd->storage_class & STClazy))
|
||||
t = getIrParameter(vd)->value->getType()->getContainedType(0);
|
||||
else
|
||||
} else if (vd->isParameter() && (vd->storage_class & STClazy)) {
|
||||
// The LL type is a delegate (LL struct).
|
||||
// Depending on the used TargetABI, the LL parameter is either a struct or
|
||||
// a pointer to a struct (`byval` attribute, ExplicitByvalRewrite).
|
||||
t = getIrParameter(vd)->value->getType();
|
||||
if (t->isPointerTy())
|
||||
t = t->getPointerElementType();
|
||||
assert(t->isStructTy());
|
||||
} else {
|
||||
t = DtoMemType(vd->type);
|
||||
}
|
||||
|
||||
builder.addType(t, getTypeAllocSize(t));
|
||||
|
||||
|
@ -477,7 +484,6 @@ void DtoCreateNestedContext(FuncGenState &funcGen) {
|
|||
|
||||
IrLocal *irLocal = getIrLocal(vd);
|
||||
LLValue *gep = DtoGEPi(frame, 0, irLocal->nestedIndex, vd->toChars());
|
||||
LLSmallVector<int64_t, 2> dwarfAddrOps;
|
||||
if (vd->isParameter()) {
|
||||
IF_LOG Logger::println("nested param: %s", vd->toChars());
|
||||
LOG_SCOPE
|
||||
|
@ -505,6 +511,7 @@ void DtoCreateNestedContext(FuncGenState &funcGen) {
|
|||
}
|
||||
|
||||
if (global.params.symdebug) {
|
||||
LLSmallVector<int64_t, 1> dwarfAddrOps;
|
||||
#if LDC_LLVM_VER < 500
|
||||
// Because we are passing a GEP instead of an alloca to
|
||||
// llvm.dbg.declare, we have to make the address dereference explicit.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue