Mercurial > projects > ldc
diff gen/binops.cpp @ 213:7816aafeea3c trunk
[svn r229] Updated the object.d implementation to the latest Tango.
Fixed a bunch of the built-in typeinfos for arrays, they did not inherit TypeInfo_Array.
Applied patch to tango/text/convert/Layout.d by fvbommel, closes #47 .
Cleaned up some type code.
Replaced uses of llvm::Type with LLType (a typedef), same for Value and Constant.
Fixed a few cases where typeinfo for user structs could be emitted multiple times, seems to still be some cases of this :/
author | lindquist |
---|---|
date | Fri, 30 May 2008 19:32:04 +0200 |
parents | 4d1e9eb001e0 |
children | a95056b3c996 |
line wrap: on
line diff
--- a/gen/binops.cpp Tue May 27 22:14:24 2008 +0200 +++ b/gen/binops.cpp Fri May 30 19:32:04 2008 +0200 @@ -10,7 +10,7 @@ DValue* DtoBinAdd(DValue* lhs, DValue* rhs) { - llvm::Value* v = gIR->ir->CreateAdd(lhs->getRVal(), rhs->getRVal(), "tmp"); + LLValue* v = gIR->ir->CreateAdd(lhs->getRVal(), rhs->getRVal(), "tmp"); return new DImValue( lhs->getType(), v ); } @@ -18,7 +18,7 @@ DValue* DtoBinSub(DValue* lhs, DValue* rhs) { - llvm::Value* v = gIR->ir->CreateSub(lhs->getRVal(), rhs->getRVal(), "tmp"); + LLValue* v = gIR->ir->CreateSub(lhs->getRVal(), rhs->getRVal(), "tmp"); return new DImValue( lhs->getType(), v ); } @@ -26,7 +26,7 @@ DValue* DtoBinMul(DValue* lhs, DValue* rhs) { - llvm::Value* v = gIR->ir->CreateMul(lhs->getRVal(), rhs->getRVal(), "tmp"); + LLValue* v = gIR->ir->CreateMul(lhs->getRVal(), rhs->getRVal(), "tmp"); return new DImValue( lhs->getType(), v ); } @@ -38,7 +38,7 @@ llvm::Value *l, *r; l = lhs->getRVal(); r = rhs->getRVal(); - llvm::Value* res; + LLValue* res; if (t->isfloating()) res = gIR->ir->CreateFDiv(l, r, "tmp"); else if (!t->isunsigned()) @@ -56,7 +56,7 @@ llvm::Value *l, *r; l = lhs->getRVal(); r = rhs->getRVal(); - llvm::Value* res; + LLValue* res; if (t->isfloating()) res = gIR->ir->CreateFRem(l, r, "tmp"); else if (!t->isunsigned())