Cleanup: Remove unused code in backend, silence some warnings.

This removed quite some clutter that has presumably piled up because LDC is seldom built with a lot of warnings enabled due to DMDFE.
This commit is contained in:
David Nadlinger
2011-04-24 12:21:33 +02:00
parent 009ce6e161
commit 7a24e12736
15 changed files with 25 additions and 69 deletions

View File

@@ -22,7 +22,6 @@ const llvm::StructType* DtoComplexType(Type* type)
const LLType* DtoComplexBaseType(Type* t)
{
TY ty = t->toBasetype()->ty;
const LLType* base;
if (ty == Tcomplex32) {
return LLType::getFloatTy(gIR->context());
}
@@ -46,11 +45,7 @@ LLConstant* DtoConstComplex(Type* _ty, long double re, long double im)
{
TY ty = _ty->toBasetype()->ty;
llvm::ConstantFP* fre;
llvm::ConstantFP* fim;
Type* base = 0;
if (ty == Tcomplex32) {
base = Type::tfloat32;
}
@@ -132,8 +127,6 @@ void DtoComplexSet(LLValue* c, LLValue* re, LLValue* im)
void DtoGetComplexParts(Loc& loc, Type* to, DValue* val, LLValue*& re, LLValue*& im)
{
const LLType* base = DtoComplexBaseType(to);
Type* baserety;
Type* baseimty;
TY ty = to->toBasetype()->ty;
@@ -403,7 +396,7 @@ LLValue* DtoComplexEquals(Loc& loc, TOK op, DValue* lhs, DValue* rhs)
{
Type* type = lhs->getType();
llvm::Value *lhs_re, *lhs_im, *rhs_re, *rhs_im, *res_re, *res_im;
llvm::Value *lhs_re, *lhs_im, *rhs_re, *rhs_im;
// lhs values
DtoGetComplexParts(loc, type, lhs, lhs_re, lhs_im);