changeset 289:17d3b3236334 trunk

[svn r310] Fixed a problem with incomplete types and templates in typeinfo code.
author lindquist
date Sat, 21 Jun 2008 16:22:29 +0200
parents ba4e4298009a
children ebaf65fc4726
files gen/llvmhelpers.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gen/llvmhelpers.cpp	Sat Jun 21 14:06:00 2008 +0200
+++ b/gen/llvmhelpers.cpp	Sat Jun 21 16:22:29 2008 +0200
@@ -1085,6 +1085,7 @@
 
 LLConstant* DtoTypeInfoOf(Type* type, bool base)
 {
+    type = type->merge(); // seems like this is needed in some cases with templates.
     const LLType* typeinfotype = DtoType(Type::typeinfo->type);
     if (!type->vtinfo)
         type->getTypeInfo(NULL);
@@ -1098,6 +1099,8 @@
     return c;
 }
 
+//////////////////////////////////////////////////////////////////////////////////////////
+
 void findDefaultTarget()
 {
     std::string err_str;