mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-06 02:45:25 +03:00
Make DtoIndexAggregate
return a DLValue
(#4112)
This commit is contained in:
parent
78c37450d6
commit
7d8638c27a
4 changed files with 14 additions and 13 deletions
|
@ -1878,7 +1878,7 @@ FuncDeclaration *getParentFunc(Dsymbol *sym) {
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
LLValue *DtoIndexAggregate(LLValue *src, AggregateDeclaration *ad,
|
||||
DLValue *DtoIndexAggregate(LLValue *src, AggregateDeclaration *ad,
|
||||
VarDeclaration *vd) {
|
||||
IF_LOG Logger::println("Indexing aggregate field %s:", vd->toPrettyChars());
|
||||
LOG_SCOPE;
|
||||
|
@ -1924,7 +1924,7 @@ LLValue *DtoIndexAggregate(LLValue *src, AggregateDeclaration *ad,
|
|||
val = DtoBitCast(val, DtoPtrToType(vd->type));
|
||||
|
||||
IF_LOG Logger::cout() << "Value: " << *val << '\n';
|
||||
return val;
|
||||
return new DLValue(vd->type, val);
|
||||
}
|
||||
|
||||
unsigned getFieldGEPIndex(AggregateDeclaration *ad, VarDeclaration *vd) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue