Mercurial > projects > ldc
diff gen/toobj.cpp @ 103:855adfdb8d38 trunk
[svn r107] Getting .classinfo on a class instance now works (classinfo is stored in vtable)
author | lindquist |
---|---|
date | Sun, 18 Nov 2007 08:25:07 +0100 |
parents | 027b8d8b71ec |
children | 5b5194b25f33 |
line wrap: on
line diff
--- a/gen/toobj.cpp Sun Nov 18 06:52:57 2007 +0100 +++ b/gen/toobj.cpp Sun Nov 18 08:25:07 2007 +0100 @@ -85,6 +85,16 @@ ir.dmodule->llvmCompileUnit = DtoDwarfCompileUnit(this,true); } + // start out by providing opaque for the built-in class types + if (!ClassDeclaration::object->type->llvmType) + ClassDeclaration::object->type->llvmType = new llvm::PATypeHolder(llvm::OpaqueType::get()); + + if (!Type::typeinfo->type->llvmType) + Type::typeinfo->type->llvmType = new llvm::PATypeHolder(llvm::OpaqueType::get()); + + if (!ClassDeclaration::classinfo->type->llvmType) + ClassDeclaration::classinfo->type->llvmType = new llvm::PATypeHolder(llvm::OpaqueType::get()); + // process module members for (int k=0; k < members->dim; k++) { Dsymbol* dsym = (Dsymbol*)(members->data[k]);