Grab the LLVMContext and parent Module of SI ahead of the
authorDan Gohman <gohman@apple.com>
Tue, 28 Jul 2009 00:37:06 +0000 (00:37 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 28 Jul 2009 00:37:06 +0000 (00:37 +0000)
commita195b7ffd6612a331751c7b6042d5cd921ee586c
tree88bba7a98e80cc9e3853535e6777cc06fa77b45c
parent1f0962756dc46a2909250d242dfa2953eb15e036
Grab the LLVMContext and parent Module of SI ahead of the
point where SI can get deleted. This fixes a use of free'd memory.
This fixes Externals/Povray.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77285 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/MemCpyOptimizer.cpp