[PATCH] D51658: Fix a memory leak after rL341386.
Hiroshi Yamauchi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 4 14:12:31 PDT 2018
yamauchi created this revision.
yamauchi added a reviewer: davidxl.
Repository:
rL LLVM
https://reviews.llvm.org/D51658
Files:
lib/Transforms/Instrumentation/ControlHeightReduction.cpp
Index: lib/Transforms/Instrumentation/ControlHeightReduction.cpp
===================================================================
--- lib/Transforms/Instrumentation/ControlHeightReduction.cpp
+++ lib/Transforms/Instrumentation/ControlHeightReduction.cpp
@@ -1753,8 +1753,8 @@
"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,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51658.163914.patch
Type: text/x-patch
Size: 692 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180904/9e3ea0fa/attachment-0001.bin>
More information about the llvm-commits
mailing list