mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 17:11:44 +03:00
Enforce type consistency for most DValues
At the cost of some more bitcasts.
This commit is contained in:
parent
88b19d3d51
commit
d6dcc7a4db
7 changed files with 78 additions and 99 deletions
|
@ -261,8 +261,8 @@ DValue *binBitwise(Loc &loc, Type *type, Expression *lhs, Expression *rhs,
|
|||
bool loadLhsAfterRhs) {
|
||||
auto rvals = evalSides(lhs, rhs, loadLhsAfterRhs);
|
||||
|
||||
LLValue *l = DtoRVal(rvals.lhs);
|
||||
LLValue *r = DtoRVal(DtoCast(loc, rvals.rhs, lhs->type));
|
||||
LLValue *l = DtoRVal(DtoCast(loc, rvals.lhs, type));
|
||||
LLValue *r = DtoRVal(DtoCast(loc, rvals.rhs, type));
|
||||
LLValue *res = llvm::BinaryOperator::Create(binOp, l, r, "", gIR->scopebb());
|
||||
|
||||
return new DImValue(type, res);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue