diff options
author | Matthijs Kooijman <matthijs@stdin.nl> | 2008-05-30 12:35:46 +0000 |
---|---|---|
committer | Matthijs Kooijman <matthijs@stdin.nl> | 2008-05-30 12:35:46 +0000 |
commit | 494661c623e06122eb63fe3a78aef131cdad10d2 (patch) | |
tree | dbea1cf69d1917c909ee09521ce20175ff8ad15e /lib/Transforms/IPO | |
parent | 74b5e07cc4a65989eb43bdc016d51db3c192691f (diff) | |
download | llvm-494661c623e06122eb63fe3a78aef131cdad10d2.tar.gz llvm-494661c623e06122eb63fe3a78aef131cdad10d2.tar.bz2 llvm-494661c623e06122eb63fe3a78aef131cdad10d2.tar.xz |
Use eraseFromParent() instead of doing that manually in two places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51770 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO')
-rw-r--r-- | lib/Transforms/IPO/DeadArgumentElimination.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp index 2dab695224..1ca5a3982a 100644 --- a/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp @@ -626,7 +626,7 @@ void DAE::RemoveDeadArgumentsFromFunction(Function *F) { // 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 @@ void DAE::RemoveDeadArgumentsFromFunction(Function *F) { } // Now that the old function is dead, delete it. - F->getParent()->getFunctionList().erase(F); + F->eraseFromParent(); } bool DAE::runOnModule(Module &M) { |