diff gen/functions.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 5ab8e92611f9
children fd7ad91fd713
line wrap: on
line diff
--- a/gen/functions.cpp	Thu Nov 22 22:30:10 2007 +0100
+++ b/gen/functions.cpp	Sat Nov 24 06:33:00 2007 +0100
@@ -192,7 +192,7 @@
         if (AggregateDeclaration* ad = fdecl->isMember()) {
             Logger::print("isMember = this is: %s\n", ad->type->toChars());
             thisty = DtoType(ad->type);
-            Logger::cout() << "this llvm type: " << *thisty << '\n';
+            //Logger::cout() << "this llvm type: " << *thisty << '\n';
             if (isaStruct(thisty) || (!gIR->structs.empty() && thisty == gIR->topstruct()->recty.get()))
                 thisty = llvm::PointerType::get(thisty);
         }
@@ -277,7 +277,8 @@
     DtoFunctionType(fdecl);
 
     // queue declaration
-    gIR->declareList.push_back(fdecl);
+    if (!fdecl->isAbstract())
+        gIR->declareList.push_back(fdecl);
 }
 
 //////////////////////////////////////////////////////////////////////////////////////////
@@ -290,6 +291,8 @@
     Logger::println("DtoDeclareFunction(%s)", fdecl->toPrettyChars());
     LOG_SCOPE;
 
+    assert(!fdecl->isAbstract());
+
     if (fdecl->llvmRunTimeHack) {
         Logger::println("runtime hack func chars: %s", fdecl->toChars());
         if (!fdecl->llvmValue)