mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 15:40:55 +03:00
Fix float->bool, #130. Thanks fvbommel.
This commit is contained in:
parent
ed8199384d
commit
0120dd767c
1 changed files with 1 additions and 1 deletions
|
@ -665,7 +665,7 @@ DValue* DtoCastFloat(Loc& loc, DValue* val, Type* to)
|
|||
if (totype->ty == Tbool) {
|
||||
rval = val->getRVal();
|
||||
LLValue* zero = LLConstant::getNullValue(rval->getType());
|
||||
rval = gIR->ir->CreateFCmpONE(rval, zero, "tmp");
|
||||
rval = gIR->ir->CreateFCmpUNE(rval, zero, "tmp");
|
||||
}
|
||||
else if (totype->iscomplex()) {
|
||||
return DtoComplex(loc, to, val);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue