comparison gen/llvmhelpers.cpp @ 1466:8bf5fa175555

Make sure typeinfo output are mutable types, this is a temporary workaround to get druntime genobj.d to compile until we figure out what typeinfos are actually needed here and there ...
author Tomas Lindquist Olsen <tomas.l.olsen gmail com>
date Wed, 03 Jun 2009 04:12:28 +0200
parents a5526b7a5ae6
children 4dca8ed9d8b7
comparison
equal deleted inserted replaced
1465:dd72f56ad211 1466:8bf5fa175555
1316 1316
1317 ////////////////////////////////////////////////////////////////////////////////////////// 1317 //////////////////////////////////////////////////////////////////////////////////////////
1318 1318
1319 LLConstant* DtoTypeInfoOf(Type* type, bool base) 1319 LLConstant* DtoTypeInfoOf(Type* type, bool base)
1320 { 1320 {
1321 #if DMDV2
1322 // FIXME: this is probably wrong, but it makes druntime's genobj.d compile!
1323 type = type->mutableOf()->merge(); // needed.. getTypeInfo does the same
1324 #else
1321 type = type->merge(); // needed.. getTypeInfo does the same 1325 type = type->merge(); // needed.. getTypeInfo does the same
1326 #endif
1322 type->getTypeInfo(NULL); 1327 type->getTypeInfo(NULL);
1323 TypeInfoDeclaration* tidecl = type->vtinfo; 1328 TypeInfoDeclaration* tidecl = type->vtinfo;
1324 assert(tidecl); 1329 assert(tidecl);
1325 tidecl->codegen(Type::sir); 1330 tidecl->codegen(Type::sir);
1326 assert(tidecl->ir.irGlobal != NULL); 1331 assert(tidecl->ir.irGlobal != NULL);