diff gen/classes.cpp @ 802:28ce72c60a21

Fixed some problems with the addZeros forward declarations having type mismatches.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Sat, 29 Nov 2008 20:57:52 +0100
parents c8d9b30a0dc2
children c62c6936635b
line wrap: on
line diff
--- a/gen/classes.cpp	Sat Nov 29 18:28:32 2008 +0100
+++ b/gen/classes.cpp	Sat Nov 29 20:57:52 2008 +0100
@@ -421,10 +421,6 @@
         DtoTypeInfoOf(cd->type, false);
 }
 
-//////////////////////////////////////////////////////////////////////////////////////////
-
-void addZeros(std::vector<llvm::Constant*>& inits, size_t pos, size_t offset); // irstruct.cpp
-
 //////////////////////////////////////////////////////////////////////////////
 
 // adds data fields and interface vtables to the constant initializer of class cd
@@ -547,6 +543,9 @@
         FuncDeclaration* fd = dsym->isFuncDeclaration();
         assert(fd);
 
+        // if function is abstract,
+        // or class is abstract, and func has no body,
+        // emit a null vtbl entry
         if (fd->isAbstract() || (cd->isAbstract() && !fd->fbody))
         {
             sinits[k] = getNullPtr(getVoidPtrType());