comparison gen/llvmhelpers.cpp @ 1554:d6e8d5db259f

LLVMContext changes up to r77366
author Benjamin Kramer <benny.kra@gmail.com>
date Thu, 30 Jul 2009 15:25:10 +0200
parents 08c8ef491c97
children 1d5c3354b3c2
comparison
equal deleted inserted replaced
1553:f55ca8a1598c 1554:d6e8d5db259f
512 if (rval->getType() == tolltype) { 512 if (rval->getType() == tolltype) {
513 return new DImValue(_to, rval); 513 return new DImValue(_to, rval);
514 } 514 }
515 515
516 if (to->ty == Tbool) { 516 if (to->ty == Tbool) {
517 LLValue* zero = gIR->context().getConstantInt(rval->getType(), 0, false); 517 LLValue* zero = LLConstantInt::get(rval->getType(), 0, false);
518 rval = gIR->ir->CreateICmpNE(rval, zero, "tmp"); 518 rval = gIR->ir->CreateICmpNE(rval, zero, "tmp");
519 } 519 }
520 else if (to->isintegral()) { 520 else if (to->isintegral()) {
521 if (fromsz < tosz || from->ty == Tbool) { 521 if (fromsz < tosz || from->ty == Tbool) {
522 if (Logger::enabled()) 522 if (Logger::enabled())