-// Instantiate Templates - This ugliness is the price we have to pay
-// for having a DefHolderImpl.h file seperate from DefHolder.h! :(
-//
-template class ValueHolder<GlobalVariable, Module, Module>;
-template class ValueHolder<Function, Module, Module>;
+Function *ilist_traits<Function>::createNode() {
+ return new Function(FunctionType::get(Type::VoidTy,std::vector<const Type*>(),
+ false), false);
+}
+GlobalVariable *ilist_traits<GlobalVariable>::createNode() {
+ return new GlobalVariable(Type::IntTy, false, false);
+}
+
+iplist<Function> &ilist_traits<Function>::getList(Module *M) {
+ return M->getFunctionList();
+}
+iplist<GlobalVariable> &ilist_traits<GlobalVariable>::getList(Module *M) {
+ return M->getGlobalList();
+}
+
+// Explicit instantiations of SymbolTableListTraits since some of the methods
+// are not in the public header file...
+template SymbolTableListTraits<GlobalVariable, Module, Module>;
+template SymbolTableListTraits<Function, Module, Module>;