[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 :/
This commit is contained in:
Tomas Lindquist Olsen
2008-05-30 19:32:04 +02:00
parent 0b479b5749
commit b4bb3aaec4
40 changed files with 1219 additions and 1136 deletions

View File

@@ -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* DtoBinAdd(DValue* lhs, DValue* rhs)
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* DtoBinSub(DValue* lhs, DValue* rhs)
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 @@ DValue* DtoBinDiv(DValue* lhs, DValue* rhs)
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 @@ DValue* DtoBinRem(DValue* lhs, DValue* rhs)
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())