mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
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
This commit is contained in:
parent
74b5e07cc4
commit
494661c623
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user