diff options
Diffstat (limited to 'llvm/lib/IR/BasicBlock.cpp')
| -rw-r--r-- | llvm/lib/IR/BasicBlock.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/IR/BasicBlock.cpp b/llvm/lib/IR/BasicBlock.cpp index 29f2cbf611fa..de32771ab05d 100644 --- a/llvm/lib/IR/BasicBlock.cpp +++ b/llvm/lib/IR/BasicBlock.cpp @@ -175,13 +175,13 @@ template <> void llvm::invalidateParentIListOrdering(BasicBlock *BB) { // Explicit instantiation of SymbolTableListTraits since some of the methods // are not in the public header file... -template class llvm::SymbolTableListTraits<Instruction, - ilist_iterator_bits<true>>; +template class llvm::SymbolTableListTraits< + Instruction, ilist_iterator_bits<true>, ilist_parent<BasicBlock>>; BasicBlock::BasicBlock(LLVMContext &C, const Twine &Name, Function *NewParent, BasicBlock *InsertBefore) : Value(Type::getLabelTy(C), Value::BasicBlockVal), - IsNewDbgInfoFormat(false), Parent(nullptr) { + IsNewDbgInfoFormat(UseNewDbgInfoFormat), Parent(nullptr) { if (NewParent) insertInto(NewParent, InsertBefore); @@ -189,6 +189,7 @@ BasicBlock::BasicBlock(LLVMContext &C, const Twine &Name, Function *NewParent, assert(!InsertBefore && "Cannot insert block before another block with no function!"); + end().getNodePtr()->setParent(this); setName(Name); if (NewParent) setIsNewDbgInfoFormat(NewParent->IsNewDbgInfoFormat); |
