processStore may delete the instruction, avoid

using dyn_cast<> on already freed memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50618 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Torok Edwin 2008-05-04 08:51:25 +00:00
parent 9d9dc7d176
commit 529bd53411

View File

@ -718,8 +718,7 @@ bool MemCpyOpt::iterateOnFunction(Function &F) {
if (StoreInst *SI = dyn_cast<StoreInst>(I))
changed_function |= processStore(SI, BI);
if (MemCpyInst* M = dyn_cast<MemCpyInst>(I)) {
else if (MemCpyInst* M = dyn_cast<MemCpyInst>(I)) {
changed_function |= processMemCpy(M);
}
}