mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Fixed most regressions from last commit.
This commit is contained in:
@@ -119,9 +119,12 @@ DValue* DtoComplex(Loc& loc, Type* to, DValue* val)
|
||||
if (t->isimaginary()) {
|
||||
res = DtoAggrPair(complexTy, LLConstant::getNullValue(DtoType(baserety)), DtoCastFloat(loc, val, baseimty)->getRVal());
|
||||
}
|
||||
else if (t->isfloating() || t->isintegral()) {
|
||||
else if (t->isfloating()) {
|
||||
res = DtoAggrPair(complexTy, DtoCastFloat(loc, val, baserety)->getRVal(), LLConstant::getNullValue(DtoType(baseimty)));
|
||||
}
|
||||
else if (t->isintegral()) {
|
||||
res = DtoAggrPair(complexTy, DtoCastInt(loc, val, baserety)->getRVal(), LLConstant::getNullValue(DtoType(baseimty)));
|
||||
}
|
||||
else {
|
||||
assert(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user