[PATCH] D50717: [SimplifyCFG] Remove pointer from SmallPtrSet before deletion
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 15 06:57:03 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL339773: [SimplifyCFG] Remove pointer from SmallPtrSet before deletion (authored by sima, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D50717?vs=160609&id=160799#toc
Repository:
rL LLVM
https://reviews.llvm.org/D50717
Files:
llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
Index: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -3861,9 +3861,9 @@
}
// The landingpad is now unreachable. Zap it.
- BB->eraseFromParent();
if (LoopHeaders)
LoopHeaders->erase(BB);
+ BB->eraseFromParent();
return true;
}
@@ -4083,9 +4083,9 @@
// If we eliminated all predecessors of the block, delete the block now.
if (pred_empty(BB)) {
// We know there are no successors, so just nuke the block.
- BB->eraseFromParent();
if (LoopHeaders)
LoopHeaders->erase(BB);
+ BB->eraseFromParent();
}
return true;
@@ -4245,9 +4245,9 @@
// If this block is now dead, remove it.
if (pred_empty(BB) && BB != &BB->getParent()->getEntryBlock()) {
// We know there are no successors, so just nuke the block.
- BB->eraseFromParent();
if (LoopHeaders)
LoopHeaders->erase(BB);
+ BB->eraseFromParent();
return true;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50717.160799.patch
Type: text/x-patch
Size: 1099 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180815/9acf9ba9/attachment.bin>
More information about the llvm-commits
mailing list