diff ir/irtypeclass.cpp @ 1253:752bed475b75

Fixed classinfo.interfaces for .. interfaces!
author Tomas Lindquist Olsen <tomas.l.olsen gmail com>
date Tue, 21 Apr 2009 20:19:53 +0200
parents 465a77c904d4
children bbe6d2b87842
line wrap: on
line diff
--- a/ir/irtypeclass.cpp	Tue Apr 21 19:32:22 2009 +0200
+++ b/ir/irtypeclass.cpp	Tue Apr 21 20:19:53 2009 +0200
@@ -142,8 +142,13 @@
     // add vtbl
     defaultTypes.push_back(llvm::PointerType::get(vtbl_pa.get(), 0));
 
-    // interface are just a vtable
-    if (!cd->isInterfaceDeclaration())
+    // interfaces are just a vtable
+    if (cd->isInterfaceDeclaration())
+    {
+        num_interface_vtbls = cd->vtblInterfaces ? cd->vtblInterfaces->dim : 0;
+    }
+    // classes have monitor and fields
+    else
     {
         // add monitor
         defaultTypes.push_back(llvm::PointerType::get(llvm::Type::Int8Ty, 0));