diff gen/tollvm.cpp @ 116:fd7ad91fd713 trunk

[svn r120] ModuleInfo implementation is now almost complete. Fixed some nasty static array-initializer bugs. Fixed bug in DtoArrayLen and DtoArrayPtr for full slices of static arrays.
author lindquist
date Sun, 25 Nov 2007 18:55:52 +0100
parents 5880c12dba83
children 9c79b61fb638
line wrap: on
line diff
--- a/gen/tollvm.cpp	Sun Nov 25 03:58:55 2007 +0100
+++ b/gen/tollvm.cpp	Sun Nov 25 18:55:52 2007 +0100
@@ -1617,6 +1617,38 @@
 }
 
 //////////////////////////////////////////////////////////////////////////////////////////
+void DtoEmptyAllLists()
+{
+    for(;;)
+    {
+        Dsymbol* dsym;
+        if (!gIR->resolveList.empty()) {
+            dsym = gIR->resolveList.front();
+            gIR->resolveList.pop_front();
+            DtoResolveDsymbol(dsym);
+        }
+        else if (!gIR->declareList.empty()) {
+            dsym = gIR->declareList.front();
+            gIR->declareList.pop_front();
+            DtoDeclareDsymbol(dsym);
+        }
+        else if (!gIR->constInitList.empty()) {
+            dsym = gIR->constInitList.front();
+            gIR->constInitList.pop_front();
+            DtoConstInitDsymbol(dsym);
+        }
+        else if (!gIR->defineList.empty()) {
+            dsym = gIR->defineList.front();
+            gIR->defineList.pop_front();
+            DtoDefineDsymbol(dsym);
+        }
+        else {
+            break;
+        }
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////
 
 void DtoForceDeclareDsymbol(Dsymbol* dsym)
 {