Mercurial > projects > ldc
comparison gen/classes.cpp @ 669:92ec7487a1a0
Fix odd interfaceInfoType bug.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Wed, 08 Oct 2008 20:28:59 +0200 |
parents | c42173b3557b |
children | 5a2983f97498 |
comparison
equal
deleted
inserted
replaced
668:216b14b9a773 | 669:92ec7487a1a0 |
---|---|
277 spa = *ts->ir.type; | 277 spa = *ts->ir.type; |
278 | 278 |
279 // name the type | 279 // name the type |
280 gIR->module->addTypeName(cd->mangle(), ts->ir.type->get()); | 280 gIR->module->addTypeName(cd->mangle(), ts->ir.type->get()); |
281 | 281 |
282 // get interface info type | |
283 const llvm::StructType* infoTy = DtoInterfaceInfoType(); | |
284 | |
285 // create vtable type | 282 // create vtable type |
286 llvm::GlobalVariable* svtblVar = 0; | 283 llvm::GlobalVariable* svtblVar = 0; |
287 #if OPAQUE_VTBLS | 284 #if OPAQUE_VTBLS |
288 // void*[vtbl.dim] | 285 // void*[vtbl.dim] |
289 const llvm::ArrayType* svtbl_ty | 286 const llvm::ArrayType* svtbl_ty |
309 } | 306 } |
310 else if (ClassDeclaration* cd2 = dsym->isClassDeclaration()) { | 307 else if (ClassDeclaration* cd2 = dsym->isClassDeclaration()) { |
311 Logger::println("*** ClassDeclaration in vtable: %s", cd2->toChars()); | 308 Logger::println("*** ClassDeclaration in vtable: %s", cd2->toChars()); |
312 const LLType* cinfoty; | 309 const LLType* cinfoty; |
313 if (cd->isInterfaceDeclaration()) { | 310 if (cd->isInterfaceDeclaration()) { |
314 cinfoty = infoTy; | 311 cinfoty = DtoInterfaceInfoType(); |
315 } | 312 } |
316 else if (cd != ClassDeclaration::classinfo) { | 313 else if (cd != ClassDeclaration::classinfo) { |
317 cinfoty = ClassDeclaration::classinfo->type->ir.type->get(); | 314 cinfoty = ClassDeclaration::classinfo->type->ir.type->get(); |
318 } | 315 } |
319 else { | 316 else { |