+#include "Support/LeakDetector.h"
+#include "SymbolTableListTraitsImpl.h"
+
+BasicBlock *ilist_traits<BasicBlock>::createNode() {
+ BasicBlock *Ret = new BasicBlock();
+ // This should not be garbage monitored.
+ LeakDetector::removeGarbageObject(Ret);
+ return Ret;
+}
+
+iplist<BasicBlock> &ilist_traits<BasicBlock>::getList(Function *F) {
+ return F->getBasicBlockList();
+}
+
+Argument *ilist_traits<Argument>::createNode() {
+ Argument *Ret = new Argument(Type::IntTy);
+ // This should not be garbage monitored.
+ LeakDetector::removeGarbageObject(Ret);
+ return Ret;
+}
+
+iplist<Argument> &ilist_traits<Argument>::getList(Function *F) {
+ return F->getArgumentList();
+}
+
+// Explicit instantiations of SymbolTableListTraits since some of the methods
+// are not in the public header file...
+template SymbolTableListTraits<Argument, Function, Function>;
+template SymbolTableListTraits<BasicBlock, Function, Function>;