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 ...

This commit is contained in:
Tomas Lindquist Olsen 2009-06-03 04:12:28 +02:00
parent b218bfc828
commit 062b6d93c4

View file

@ -1318,7 +1318,12 @@ void DtoAnnotation(const char* str)
LLConstant* DtoTypeInfoOf(Type* type, bool base) LLConstant* DtoTypeInfoOf(Type* type, bool base)
{ {
#if DMDV2
// FIXME: this is probably wrong, but it makes druntime's genobj.d compile!
type = type->mutableOf()->merge(); // needed.. getTypeInfo does the same
#else
type = type->merge(); // needed.. getTypeInfo does the same type = type->merge(); // needed.. getTypeInfo does the same
#endif
type->getTypeInfo(NULL); type->getTypeInfo(NULL);
TypeInfoDeclaration* tidecl = type->vtinfo; TypeInfoDeclaration* tidecl = type->vtinfo;
assert(tidecl); assert(tidecl);