Mercurial > projects > ldc
comparison gen/complex.cpp @ 1529:ad7f2f1862d6
Adjust LDC to work with the LLVMContext LLVM changes.
This means we now require a fairly new LLVM revision. I use 75234.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Fri, 10 Jul 2009 21:30:02 +0200 |
parents | cc5fee7836dc |
children | 8ca25bd765a3 |
comparison
equal
deleted
inserted
replaced
1528:15f1707721fa | 1529:ad7f2f1862d6 |
---|---|
394 cmpop = llvm::FCmpInst::FCMP_OEQ; | 394 cmpop = llvm::FCmpInst::FCMP_OEQ; |
395 else | 395 else |
396 cmpop = llvm::FCmpInst::FCMP_UNE; | 396 cmpop = llvm::FCmpInst::FCMP_UNE; |
397 | 397 |
398 // (l.re==r.re && l.im==r.im) or (l.re!=r.re || l.im!=r.im) | 398 // (l.re==r.re && l.im==r.im) or (l.re!=r.re || l.im!=r.im) |
399 LLValue* b1 = new llvm::FCmpInst(cmpop, lhs_re, rhs_re, "tmp", gIR->scopebb()); | 399 LLValue* b1 = gIR->ir->CreateFCmp(cmpop, lhs_re, rhs_re, "tmp"); |
400 LLValue* b2 = new llvm::FCmpInst(cmpop, lhs_im, rhs_im, "tmp", gIR->scopebb()); | 400 LLValue* b2 = gIR->ir->CreateFCmp(cmpop, lhs_im, rhs_im, "tmp"); |
401 | 401 |
402 if (op == TOKequal) | 402 if (op == TOKequal) |
403 return gIR->ir->CreateAnd(b1,b2,"tmp"); | 403 return gIR->ir->CreateAnd(b1,b2,"tmp"); |
404 else | 404 else |
405 return gIR->ir->CreateOr(b1,b2,"tmp"); | 405 return gIR->ir->CreateOr(b1,b2,"tmp"); |