- for_each(TheModule->begin(), TheModule->end(), // Insert methods...
- bind_obj(this, &SlotCalculator::insertValue));
+ for (Module::const_giterator I = TheModule->gbegin(), E = TheModule->gend();
+ I != E; ++I) {
+ if (I->hasInitializer())
+ insertValue(I->getInitializer());
+ }
+
+ // Add all of the global variables to the value table...
+ //
+ for(Module::const_giterator I = TheModule->gbegin(), E = TheModule->gend();
+ I != E; ++I)
+ insertValue(I);
+
+ // Scavenge the types out of the functions, then add the functions themselves
+ // to the value table...
+ //
+ for(Module::const_iterator I = TheModule->begin(), E = TheModule->end();
+ I != E; ++I)
+ insertValue(I);