diff gen/toobj.cpp @ 113:27b9f749d9fe trunk

[svn r117] Initial working implementation of interfaces. Groundwork for all the different types of class/interface casts laid out.
author lindquist
date Sat, 24 Nov 2007 06:33:00 +0100
parents 5b5194b25f33
children 5ba6d286c941
line wrap: on
line diff
--- a/gen/toobj.cpp	Thu Nov 22 22:30:10 2007 +0100
+++ b/gen/toobj.cpp	Sat Nov 24 06:33:00 2007 +0100
@@ -389,7 +389,9 @@
     unsigned idx = 0;
     unsigned r = LLVM_ClassOffsetToIndex(this, os, idx);
     assert(r != (unsigned)-1 && "Offset not found in any aggregate field");
-    result.push_back(r+1); // vtable is 0
+    r++; // vtable is 0
+    r += vtblInterfaces->dim;
+    result.push_back(r); 
 }
 
 /* ================================================================== */