Reviewers: davidxl
Reviewed By: davidxl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D51658
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341412
91177308-0d34-0410-b5e6-
96231b3b80d8
"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,