[llvm-commits] [llvm] r51770 - /llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
Matthijs Kooijman
matthijs at stdin.nl
Fri May 30 05:35:47 PDT 2008
Author: matthijs
Date: Fri May 30 07:35:46 2008
New Revision: 51770
URL: http://llvm.org/viewvc/llvm-project?rev=51770&view=rev
Log:
Use eraseFromParent() instead of doing that manually in two places.
Modified:
llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
Modified: llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp?rev=51770&r1=51769&r2=51770&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp Fri May 30 07:35:46 2008
@@ -626,7 +626,7 @@
// Finally, remove the old call from the program, reducing the use-count of
// F.
- Call->getParent()->getInstList().erase(Call);
+ Call->eraseFromParent();
}
// Since we have now created the new function, splice the body of the old
@@ -665,7 +665,7 @@
}
// Now that the old function is dead, delete it.
- F->getParent()->getFunctionList().erase(F);
+ F->eraseFromParent();
}
bool DAE::runOnModule(Module &M) {
More information about the llvm-commits
mailing list