commit | 2a8c301c9f92d8639bbc795fcc144ca0c4d7d0ef | [log] [tgz] |
---|---|---|
author | Chris Lattner <sabre@nondot.org> | Tue Jun 17 03:57:18 2003 +0000 |
committer | Chris Lattner <sabre@nondot.org> | Tue Jun 17 03:57:18 2003 +0000 |
tree | 772757f57aaf812037961884aad3acdf07ae8857 | |
parent | a7a50133ef2cb549b190287126c97e916becb9a8 [diff] [blame] |
Don't corrupt memory when removing an instruction from the program, but not the worklist llvm-svn: 6733
diff --git a/llvm/lib/Transforms/Scalar/GCSE.cpp b/llvm/lib/Transforms/Scalar/GCSE.cpp index b467784..6883818 100644 --- a/llvm/lib/Transforms/Scalar/GCSE.cpp +++ b/llvm/lib/Transforms/Scalar/GCSE.cpp
@@ -120,6 +120,7 @@ // Erase the instruction from the program. I->getParent()->getInstList().erase(I); + WorkList.erase(I); } return true;