Mercurial > projects > ldc
comparison gen/llvmhelpers.cpp @ 1545:7fcb72d518f6
More factory methods moved to LLVMContext
author | Benjamin Kramer <benny.kra@gmail.com> |
---|---|
date | Wed, 15 Jul 2009 18:09:41 +0200 |
parents | 61f12f4651b5 |
children | c704fea92f80 |
comparison
equal
deleted
inserted
replaced
1544:8863cf7236e6 | 1545:7fcb72d518f6 |
---|---|
513 if (rval->getType() == tolltype) { | 513 if (rval->getType() == tolltype) { |
514 return new DImValue(_to, rval); | 514 return new DImValue(_to, rval); |
515 } | 515 } |
516 | 516 |
517 if (to->ty == Tbool) { | 517 if (to->ty == Tbool) { |
518 LLValue* zero = LLConstantInt::get(rval->getType(), 0, false); | 518 LLValue* zero = gIR->context().getConstantInt(rval->getType(), 0, false); |
519 rval = gIR->ir->CreateICmpNE(rval, zero, "tmp"); | 519 rval = gIR->ir->CreateICmpNE(rval, zero, "tmp"); |
520 } | 520 } |
521 else if (to->isintegral()) { | 521 else if (to->isintegral()) { |
522 if (fromsz < tosz || from->ty == Tbool) { | 522 if (fromsz < tosz || from->ty == Tbool) { |
523 if (Logger::enabled()) | 523 if (Logger::enabled()) |