[svn r117] Initial working implementation of interfaces.

Groundwork for all the different types of class/interface casts laid out.
This commit is contained in:
Tomas Lindquist Olsen
2007-11-24 06:33:00 +01:00
parent 0a8ff5931a
commit b43f5729b0
18 changed files with 867 additions and 145 deletions

View File

@@ -389,7 +389,9 @@ void ClassDeclaration::offsetToIndex(Type* t, unsigned os, std::vector<unsigned>
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);
}
/* ================================================================== */