comparison gen/structs.cpp @ 585:fbb1a366cfbc

Complex number should now follow the D ABI on x86. They're also treated as first class values now. Big change.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Tue, 09 Sep 2008 16:49:47 -0700
parents a34078905d01
children 26fce59fe80a
comparison
equal deleted inserted replaced
584:c7d7e2282ba3 585:fbb1a366cfbc
58 if (idxs.empty()) 58 if (idxs.empty())
59 idxs.push_back(0); 59 idxs.push_back(0);
60 60
61 const LLType* llt = getPtrToType(DtoType(t)); 61 const LLType* llt = getPtrToType(DtoType(t));
62 const LLType* st = getPtrToType(DtoType(sd->type)); 62 const LLType* st = getPtrToType(DtoType(sd->type));
63
64 Logger::cout() << "ptr = " << *ptr << '\n';
65 Logger::cout() << "st = " << *st << '\n';
66
63 if (ptr->getType() != st) { 67 if (ptr->getType() != st) {
64 assert(sd->ir.irStruct->hasUnions); 68 assert(sd->ir.irStruct->hasUnions);
65 ptr = gIR->ir->CreateBitCast(ptr, st, "tmp"); 69 ptr = gIR->ir->CreateBitCast(ptr, st, "tmp");
66 } 70 }
67 71