+Instruction *ilist_traits<Instruction>::createSentinel() {
+ return new DummyInst();
+}
+iplist<Instruction> &ilist_traits<Instruction>::getList(BasicBlock *BB) {
+ return BB->getInstList();
+}
+
+// Explicit instantiation of SymbolTableListTraits since some of the methods
+// are not in the public header file...
+template class SymbolTableListTraits<Instruction, BasicBlock>;
+
+
+BasicBlock::BasicBlock(const std::string &Name, Function *NewParent,
+ BasicBlock *InsertBefore, BasicBlock *Dest)
+ : User(Type::LabelTy, Value::BasicBlockVal, &unwindDest, 0), Parent(0) {
+
+ // Make sure that we get added to a function
+ LeakDetector::addGarbageObject(this);
+
+ if (InsertBefore) {
+ assert(NewParent &&
+ "Cannot insert block before another block with no function!");
+ NewParent->getBasicBlockList().insert(InsertBefore, this);
+ } else if (NewParent) {
+ NewParent->getBasicBlockList().push_back(this);
+ }
+
+ setName(Name);
+ unwindDest.init(NULL, this);
+ setUnwindDest(Dest);
+}
+
+