mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-08 03:46:02 +03:00
Opaque pointers: fix type comparison based on pointers for array copy. (don't compare pointers, because with opaque pointers they are always the same)
This commit is contained in:
parent
96b5cfb371
commit
f213aa7f65
1 changed files with 1 additions and 1 deletions
|
@ -238,7 +238,7 @@ void DtoArrayAssign(const Loc &loc, DValue *lhs, DValue *rhs, EXP op,
|
|||
LLValue *realRhsArrayPtr = (t2->ty == TY::Tarray || t2->ty == TY::Tsarray)
|
||||
? DtoArrayPtr(rhs)
|
||||
: nullptr;
|
||||
if (realRhsArrayPtr && realRhsArrayPtr->getType() == realLhsPtr->getType()) {
|
||||
if (realRhsArrayPtr && DtoMemType(t2->nextOf()) == DtoMemType(t->nextOf())) {
|
||||
// T[] = T[] T[] = T[n]
|
||||
// T[n] = T[n] T[n] = T[]
|
||||
LLValue *rhsPtr = DtoBitCast(realRhsArrayPtr, getVoidPtrType());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue