[svn r180] Fixed complex negation, and tango.math.Math now compiles.

This commit is contained in:
Tomas Lindquist Olsen
2008-05-05 20:28:59 +02:00
parent a0c6cb6673
commit 071bf5a629
5 changed files with 31 additions and 3 deletions
+9 -2
View File
@@ -2394,8 +2394,12 @@ DValue* NegExp::toElem(IRState* p)
LOG_SCOPE;
DValue* l = e1->toElem(p);
llvm::Value* val = l->getRVal();
if (type->iscomplex()) {
return DtoComplexNeg(type, l);
}
llvm::Value* val = l->getRVal();
Type* t = DtoDType(type);
llvm::Value* zero = 0;
@@ -2407,7 +2411,10 @@ DValue* NegExp::toElem(IRState* p)
else if (t->ty == Tfloat64 || t->ty == Tfloat80 || t->ty == Timaginary64 || t->ty == Timaginary80)
zero = llvm::ConstantFP::get(val->getType(), llvm::APFloat(0.0));
else
assert(0);
{
Logger::println("unhandled fp negation of type %s", t->toChars());
assert(0);
}
}
else
assert(0);