Mercurial > projects > ldc
diff gen/toir.cpp @ 1559:06d5cc873350
getTrue/getFalse were moved back to ConstantInt
Requires LLVM >= r77685
author | Benjamin Kramer <benny.kra@gmail.com> |
---|---|
date | Fri, 31 Jul 2009 19:11:07 +0200 |
parents | 4897323d47b5 |
children | 1d5c3354b3c2 |
line wrap: on
line diff
--- a/gen/toir.cpp Fri Jul 31 11:28:31 2009 +0200 +++ b/gen/toir.cpp Fri Jul 31 19:11:07 2009 +0200 @@ -1356,11 +1356,11 @@ break; case TOKleg: skip = true; - eval = gIR->context().getTrue(); + eval = LLConstantInt::getTrue(gIR->context()); break; case TOKunord: skip = true; - eval = gIR->context().getFalse(); + eval = LLConstantInt::getFalse(gIR->context()); break; default: @@ -1844,7 +1844,7 @@ llvm::PHINode* phi = p->ir->CreatePHI(LLType::Int1Ty, "andandval"); // If we jumped over evaluation of the right-hand side, // the result is false. Otherwise it's the value of the right-hand side. - phi->addIncoming(gIR->context().getFalse(), oldblock); + phi->addIncoming(LLConstantInt::getFalse(gIR->context()), oldblock); phi->addIncoming(vbool, newblock); resval = phi; } @@ -1891,7 +1891,7 @@ llvm::PHINode* phi = p->ir->CreatePHI(LLType::Int1Ty, "ororval"); // If we jumped over evaluation of the right-hand side, // the result is true. Otherwise, it's the value of the right-hand side. - phi->addIncoming(gIR->context().getTrue(), oldblock); + phi->addIncoming(LLConstantInt::getTrue(gIR->context()), oldblock); phi->addIncoming(vbool, newblock); resval = phi; }