trivial simplification
authorChris Lattner <sabre@nondot.org>
Sun, 6 Mar 2005 21:35:38 +0000 (21:35 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 6 Mar 2005 21:35:38 +0000 (21:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20494 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/LoopSimplify.cpp

index b5517cb886cf9e29084bddc8a8b2b4c1a2469a35..aa04552e14258a9cc72df4d0ee33458d70aac575 100644 (file)
@@ -437,7 +437,7 @@ static PHINode *FindPHIToPartitionLoops(Loop *L, DominatorSet &DS) {
       if (!isa<Instruction>(V) || DS.dominates(cast<Instruction>(V), PN)) {
         // This is a degenerate PHI already, don't modify it!
         PN->replaceAllUsesWith(V);
-        PN->getParent()->getInstList().erase(PN);
+        PN->eraseFromParent();
         continue;
       }