Remove DMDV1 and DMDV2.

This commit is contained in:
kai
2013-03-05 18:37:09 +01:00
parent 10e7276058
commit 1e4a8fffc2
40 changed files with 8 additions and 981 deletions

View File

@@ -185,7 +185,6 @@ LLConstant * IrStruct::getVtblInit()
fd->codegen(Type::sir);
assert(fd->ir.irFunc && "invalid vtbl function");
c = fd->ir.irFunc->func;
#if DMDV2
if (cd->isFuncHidden(fd))
{ /* fd is hidden from the view of this class.
* If fd overlaps with any function in the vtbl[], then
@@ -218,7 +217,6 @@ LLConstant * IrStruct::getVtblInit()
}
}
}
#endif
}
constants.push_back(c);
}

View File

@@ -28,11 +28,7 @@ IRLandingPadInfo::IRLandingPadInfo(Catch* catchstmt_, llvm::BasicBlock* end_) :
catchType->codegen(Type::sir);
if(catchstmt->var) {
#if DMDV2
if(!catchstmt->var->nestedrefs.dim) {
#else
if(!catchstmt->var->nestedref) {
#endif
gIR->func()->gen->landingPadInfo.getExceptionStorage();
}
}
@@ -56,11 +52,7 @@ void IRLandingPadInfo::toIR()
if(catchstmt->var) {
// use the same storage for all exceptions that are not accessed in
// nested functions
#if DMDV2
if(!catchstmt->var->nestedrefs.dim) {
#else
if(!catchstmt->var->nestedref) {
#endif
assert(!catchstmt->var->ir.irLocal);
catchstmt->var->ir.irLocal = new IrLocal(catchstmt->var);
LLValue* catch_var = gIR->func()->gen->landingPadInfo.getExceptionStorage();

View File

@@ -67,11 +67,9 @@ LLGlobalVariable * IrStruct::getInitSymbol()
// set alignment
init->setAlignment(type->alignsize());
#if DMDV2
StructDeclaration *sd = aggrdecl->isStructDeclaration();
if (sd && sd->alignment != STRUCTALIGN_DEFAULT)
init->setAlignment(sd->alignment);
#endif
return init;
}

View File

@@ -266,8 +266,6 @@ IrTypeArray* IrTypeArray::get(Type* dt)
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
#if DMDV2
IrTypeVector::IrTypeVector(Type* dt)
: IrType(dt, vector2llvm(dt))
{
@@ -297,6 +295,4 @@ llvm::Type* IrTypeVector::vector2llvm(Type* dt)
return llvm::VectorType::get(elemType, dim);
}
#endif
//////////////////////////////////////////////////////////////////////////////

View File

@@ -37,9 +37,7 @@ class IrTypeFunction;
class IrTypePointer;
class IrTypeSArray;
class IrTypeStruct;
#if DMDV2
class IrTypeVector;
#endif
//////////////////////////////////////////////////////////////////////////////
@@ -72,10 +70,8 @@ public:
virtual IrTypeSArray* isSArray() { return NULL; }
///
virtual IrTypeStruct* isStruct() { return NULL; }
#if DMDV2
///
IrTypeVector* isVector() { return NULL; }
#endif
///
Type* getDType() { return dtype; }
@@ -170,7 +166,6 @@ protected:
//////////////////////////////////////////////////////////////////////////////
#if DMDV2
/// IrType for vectors
class IrTypeVector : public IrType
{
@@ -187,6 +182,5 @@ protected:
static llvm::Type* vector2llvm(Type* dt);
};
#endif
#endif

View File

@@ -323,7 +323,6 @@ std::vector<llvm::Type*> IrTypeClass::buildVtblType(Type* first, Array* vtbl_arr
IF_LOG Logger::println("Adding type of %s", fd->toPrettyChars());
#if DMDV2
// If inferring return type and semantic3 has not been run, do it now.
// This pops up in some other places in the frontend as well, however
// it is probably a bug that it still occurs that late.
@@ -336,7 +335,6 @@ std::vector<llvm::Type*> IrTypeClass::buildVtblType(Type* first, Array* vtbl_arr
if (spec && global.errors != olderrs)
spec->errors = global.errors - olderrs;
}
#endif
if (!fd->type->nextOf()) {
// Return type of the function has not been inferred. This seems to