forked from OSchip/llvm-project
Fix a memory leak after rL341386.
Reviewers: davidxl Reviewed By: davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D51658 llvm-svn: 341412
This commit is contained in:
parent
1b55b2be7e
commit
bd897a02a0
|
@ -1753,8 +1753,8 @@ BranchInst *CHR::createMergedBranch(BasicBlock *PreEntryBlock,
|
|||
"NewEntryBlock's only pred must be EntryBlock");
|
||||
assert(VMap.find(NewEntryBlock) != VMap.end() &&
|
||||
"NewEntryBlock must have been copied");
|
||||
OldBR->removeFromParent();
|
||||
OldBR->dropAllReferences();
|
||||
OldBR->eraseFromParent();
|
||||
// The true predicate is a placeholder. It will be replaced later in
|
||||
// fixupBranchesAndSelects().
|
||||
BranchInst *NewBR = BranchInst::Create(NewEntryBlock,
|
||||
|
|
Loading…
Reference in New Issue