diff options
author | Hiroshi Yamauchi <yamauchi@google.com> | 2018-09-04 21:28:22 +0000 |
---|---|---|
committer | Hiroshi Yamauchi <yamauchi@google.com> | 2018-09-04 21:28:22 +0000 |
commit | bd897a02a0642b11eb3f5dbc6346e32c7fedce4d (patch) | |
tree | f3237ce6ce46075e833d793036a080bd73e6a374 /llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp | |
parent | 1b55b2be7ee4c5f992447ef6ca9856b8224692ec (diff) | |
download | bcm5719-llvm-bd897a02a0642b11eb3f5dbc6346e32c7fedce4d.tar.gz bcm5719-llvm-bd897a02a0642b11eb3f5dbc6346e32c7fedce4d.zip |
Fix a memory leak after rL341386.
Reviewers: davidxl
Reviewed By: davidxl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D51658
llvm-svn: 341412
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp b/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp index 9a27b4a51e5..5b1f499eacc 100644 --- a/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp +++ b/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp @@ -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, |