mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
[svn r385] Fix lvalue cast problems with -= and friends.
Fix complex DtoBoolean.
This commit is contained in:
@@ -320,10 +320,14 @@ LLValue* DtoComplexEquals(TOK op, DValue* lhs, DValue* rhs)
|
||||
else
|
||||
cmpop = llvm::FCmpInst::FCMP_UNE;
|
||||
|
||||
// (l.re==r.re && l.im==r.im)
|
||||
// (l.re==r.re && l.im==r.im) or (l.re!=r.re || l.im!=r.im)
|
||||
LLValue* b1 = new llvm::FCmpInst(cmpop, a, c, "tmp", gIR->scopebb());
|
||||
LLValue* b2 = new llvm::FCmpInst(cmpop, b, d, "tmp", gIR->scopebb());
|
||||
return gIR->ir->CreateAnd(b1,b2,"tmp");
|
||||
|
||||
if (op == TOKequal)
|
||||
return gIR->ir->CreateAnd(b1,b2,"tmp");
|
||||
else
|
||||
return gIR->ir->CreateOr(b1,b2,"tmp");
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user