Added initial D2 support, D2 frontend and changes to codegen to make things compile.

This commit is contained in:
Tomas Lindquist Olsen
2008-11-11 01:38:48 +01:00
parent fe49ee6448
commit c4c1c1d72e
115 changed files with 83772 additions and 110 deletions

View File

@@ -146,6 +146,16 @@ void Module::genobjfile(int multiobj, char** envp)
DtoDwarfCompileUnit(this);
}
// handle invalid 'objectø module
if (!ClassDeclaration::object) {
error("is missing 'class Object'");
fatal();
}
if (!ClassDeclaration::classinfo) {
error("is missing 'class ClassInfo'");
fatal();
}
// start out by providing opaque for the built-in class types
if (!ClassDeclaration::object->type->ir.type)
ClassDeclaration::object->type->ir.type = new llvm::PATypeHolder(llvm::OpaqueType::get());
@@ -993,7 +1003,15 @@ void VarDeclaration::toObjFile(int multiobj)
}
else
{
assert(ir.irField != 0);
#if DMDV2
if (!ir.irField)
{
printf("dataseg: %d\n", isDataseg());
printf("parent: %s %s\n", parent->kind(), parent->toPrettyChars());
printf("this: %s %s\n", this->kind(), this->toPrettyChars());
}
#endif
// assert(ir.irField != 0);
}
Logger::println("VarDeclaration::toObjFile is done");
}