mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-29 02:53:14 +01:00
[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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user