comparison gen/toir.cpp @ 345:5320fe65a65d trunk

[svn r366] Fixed identity exprs for structs was comparing addresses, not content!
author lindquist
date Sun, 13 Jul 2008 04:27:02 +0200
parents e20ce6d8d374
children 6057fdf797d8
comparison
equal deleted inserted replaced
344:e20ce6d8d374 345:5320fe65a65d
2258 Type* t1 = e1->type->toBasetype(); 2258 Type* t1 = e1->type->toBasetype();
2259 2259
2260 // handle dynarray specially 2260 // handle dynarray specially
2261 if (t1->ty == Tarray) 2261 if (t1->ty == Tarray)
2262 return new DImValue(type, DtoDynArrayIs(op,u,v)); 2262 return new DImValue(type, DtoDynArrayIs(op,u,v));
2263 2263 // also structs
2264 else if (t1->ty == Tstruct)
2265 return new DImValue(type, DtoStructEquals(op,u,v));
2266
2267 // FIXME this stuff isn't pretty
2264 LLValue* l = u->getRVal(); 2268 LLValue* l = u->getRVal();
2265 LLValue* r = v->getRVal(); 2269 LLValue* r = v->getRVal();
2266 LLValue* eval = 0; 2270 LLValue* eval = 0;
2267 2271
2268 if (t1->ty == Tdelegate) { 2272 if (t1->ty == Tdelegate) {