comparison 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
comparison
equal deleted inserted replaced
102:027b8d8b71ec 103:855adfdb8d38
83 if (global.params.symdebug) { 83 if (global.params.symdebug) {
84 RegisterDwarfSymbols(ir.module); 84 RegisterDwarfSymbols(ir.module);
85 ir.dmodule->llvmCompileUnit = DtoDwarfCompileUnit(this,true); 85 ir.dmodule->llvmCompileUnit = DtoDwarfCompileUnit(this,true);
86 } 86 }
87 87
88 // start out by providing opaque for the built-in class types
89 if (!ClassDeclaration::object->type->llvmType)
90 ClassDeclaration::object->type->llvmType = new llvm::PATypeHolder(llvm::OpaqueType::get());
91
92 if (!Type::typeinfo->type->llvmType)
93 Type::typeinfo->type->llvmType = new llvm::PATypeHolder(llvm::OpaqueType::get());
94
95 if (!ClassDeclaration::classinfo->type->llvmType)
96 ClassDeclaration::classinfo->type->llvmType = new llvm::PATypeHolder(llvm::OpaqueType::get());
97
88 // process module members 98 // process module members
89 for (int k=0; k < members->dim; k++) { 99 for (int k=0; k < members->dim; k++) {
90 Dsymbol* dsym = (Dsymbol*)(members->data[k]); 100 Dsymbol* dsym = (Dsymbol*)(members->data[k]);
91 assert(dsym); 101 assert(dsym);
92 dsym->toObjFile(); 102 dsym->toObjFile();